# !pip install pandas-datareader
# !pip install yfinance
# !pip install matplotlib
# !pip install seaborn
from IPython.display import Image
Image(filename='2021-03-05_17h03_49.png')
Asean
Asia
Western
-Other
import yfinance as yf
tricker = "^DJI"
stockData = yf.Ticker(tricker)
# get stock info
print(stockData.info)
start ="2010-01-01"
end ="2020-12-31"
# get historical market data
hist = stockData.history(start=start, end=end)
hist.head()
# hist.info()
{'previousClose': 34133, 'regularMarketOpen': 34163.99, 'twoHundredDayAverage': 31063.926, 'trailingAnnualDividendYield': None, 'payoutRatio': None, 'volume24Hr': None, 'regularMarketDayHigh': 34331.2, 'navPrice': None, 'averageDailyVolume10Day': 340731428, 'totalAssets': None, 'regularMarketPreviousClose': 34133, 'fiftyDayAverage': 33503.164, 'trailingAnnualDividendRate': None, 'open': 34163.99, 'toCurrency': None, 'averageVolume10days': 340731428, 'expireDate': None, 'yield': None, 'algorithm': None, 'dividendRate': None, 'exDividendDate': None, 'beta': None, 'circulatingSupply': None, 'startDate': None, 'regularMarketDayLow': 34039.66, 'priceHint': 2, 'currency': 'USD', 'regularMarketVolume': 255811646, 'lastMarket': None, 'maxSupply': None, 'openInterest': None, 'marketCap': None, 'volumeAllCurrencies': None, 'strikePrice': None, 'averageVolume': 198001056, 'priceToSalesTrailing12Months': None, 'dayLow': 34039.66, 'ask': 34319.96, 'ytdReturn': None, 'askSize': 0, 'volume': 255811646, 'fiftyTwoWeekHigh': 34331.2, 'forwardPE': None, 'maxAge': 1, 'fromCurrency': None, 'fiveYearAvgDividendYield': None, 'fiftyTwoWeekLow': 22789.62, 'bid': 34114.48, 'tradeable': False, 'dividendYield': None, 'bidSize': 0, 'dayHigh': 34331.2, 'exchange': 'DJI', 'shortName': 'Dow Jones Industrial Average', 'exchangeTimezoneName': 'America/New_York', 'exchangeTimezoneShortName': 'EDT', 'isEsgPopulated': False, 'gmtOffSetMilliseconds': '-14400000', 'quoteType': 'INDEX', 'symbol': '^DJI', 'messageBoardId': 'finmb_INDEXDJI', 'market': 'us_market', 'regularMarketPrice': 34163.99, 'logo_url': ''}
| Open | High | Low | Close | Volume | Dividends | Stock Splits | |
|---|---|---|---|---|---|---|---|
| Date | |||||||
| 2009-12-31 | 10548.509766 | 10555.009766 | 10423.129883 | 10428.049805 | 1379400 | 0 | 0 |
| 2010-01-04 | 10430.690430 | 10604.969727 | 10430.690430 | 10583.959961 | 1797800 | 0 | 0 |
| 2010-01-05 | 10584.559570 | 10584.559570 | 10522.519531 | 10572.019531 | 1885400 | 0 | 0 |
| 2010-01-06 | 10564.719727 | 10594.990234 | 10546.549805 | 10573.679688 | 1860400 | 0 | 0 |
| 2010-01-07 | 10571.110352 | 10612.370117 | 10505.209961 | 10606.860352 | 2173900 | 0 | 0 |
# Save data
data_df = yf.download(tricker, start=start, end=end)
data_df.to_csv(tricker+'.csv')
[*********************100%***********************] 1 of 1 completed
import yfinance as yf
import pandas as pd
df_trickers = pd.read_csv("StockIndexTrickers.csv")
# print(df_trickers.head())
# df_trickers.info()
start ="2009-12-25"
# start ="2010-01-01"
end ="2020-12-31"
stockDataList = []
trickers = df_trickers[df_trickers["FromYahoo"]==1][["Trickers","Stock Index"]]
# trickers
for index, row in trickers.iterrows():
stockData = yf.Ticker(row["Trickers"])
histData = stockData.history(start=start, end=end)
dataFrame = pd.DataFrame(histData["Close"])
dataFrame.columns =[stockData.info['shortName']]
stockDataList.append(dataFrame)
stockThai = pd.read_csv("SET Index Historical Data.csv")
stockThai['Date'] = pd.to_datetime(stockThai['Date'])
stockThai = stockThai.set_index('Date')
df_stockThai = pd.DataFrame(stockThai['Close'].str.replace(',','').astype(float))
df_stockThai.columns =['SET']
stockVietnam = pd.read_csv("VN Historical Data.csv")
stockVietnam['Date'] = pd.to_datetime(stockVietnam['Date'])
stockVietnam = stockVietnam.set_index('Date')
df_stockVietnam = pd.DataFrame(stockVietnam['Close'].str.replace(',','').astype(float))
df_stockVietnam.columns =["VNI"]
df_allStocks = pd.merge(df_stockThai, df_stockVietnam, how= "outer",left_index=True, right_index=True)
for i in range(len(stockDataList)):
df_allStocks = pd.merge(df_allStocks, stockDataList[i], how= "outer",left_index=True, right_index=True)
df_allStocks.info()
df_allStocks.plot()
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 3531 entries, 2009-12-24 to 2020-12-31 Data columns (total 34 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 SET 2684 non-null float64 1 VNI 2745 non-null float64 2 STI Index 2744 non-null float64 3 FTSE Bursa Malaysia KLCI 2699 non-null float64 4 Composite Index 2683 non-null float64 5 PSEi INDEX 2676 non-null float64 6 HANG SENG INDEX 2707 non-null float64 7 Shenzhen Component 2674 non-null float64 8 KOSPI Composite Index 2710 non-null float64 9 Nikkei 225 2696 non-null float64 10 ALL ORDINARIES 2780 non-null float64 11 S&P/NZX 50 INDEX GROSS ( GROSS 2686 non-null float64 12 TSEC weighted index 2699 non-null float64 13 NIFTY 50 2693 non-null float64 14 Dow Jones Industrial Average 2773 non-null float64 15 NYSE COMPOSITE (DJ) 2773 non-null float64 16 Russell 2000 2773 non-null float64 17 S&P/TSX Composite index 2763 non-null float64 18 NASDAQ Composite 2773 non-null float64 19 FTSE 100 2773 non-null float64 20 DAX PERFORMANCE-INDEX 2788 non-null float64 21 CAC 40 2814 non-null float64 22 ESTX 50 PR.EUR 2759 non-null float64 23 BEL 20 2813 non-null float64 24 MOEX Russia Index 1927 non-null float64 25 IBOVESPA 2721 non-null float64 26 IPC MEXICO 2757 non-null float64 27 S&P/CLX IPSA 2353 non-null float64 28 MERVAL 2669 non-null float64 29 TA-125 2145 non-null float64 30 Top 40 USD Net TRI Index 817 non-null float64 31 Gold Jun 21 2832 non-null float64 32 Crude Oil Jun 21 2774 non-null float64 33 Bitcoin USD 2297 non-null float64 dtypes: float64(34) memory usage: 965.5 KB
<AxesSubplot:xlabel='Date'>
# print(df_allStocks.isnull().sum())
df_allStocks = df_allStocks.ffill()
# df_allStocks.isnull().sum()
start2 ="2010-01-01"
end2 ="2020-12-31"
df_allStocks = df_allStocks.loc[start2:end2]
df_allStocks.head()
| SET | VNI | STI Index | FTSE Bursa Malaysia KLCI | Composite Index | PSEi INDEX | HANG SENG INDEX | Shenzhen Component | KOSPI Composite Index | Nikkei 225 | ... | MOEX Russia Index | IBOVESPA | IPC MEXICO | S&P/CLX IPSA | MERVAL | TA-125 | Top 40 USD Net TRI Index | Gold Jun 21 | Crude Oil Jun 21 | Bitcoin USD | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Date | |||||||||||||||||||||
| 2010-01-04 | 732.28 | 517.05 | 2894.550049 | 1275.750000 | 2575.312988 | 3004.237549 | 21823.279297 | 13533.387695 | 1696.140015 | 10654.790039 | ... | NaN | 70045.0 | 32758.529297 | 3620.699951 | 2384.489990 | 1089.339966 | NaN | 1117.699951 | 81.510002 | NaN |
| 2010-01-05 | 732.11 | 532.53 | 2920.280029 | 1288.239990 | 2605.175537 | 3027.681396 | 22279.580078 | 13517.228516 | 1690.619995 | 10681.830078 | ... | NaN | 70240.0 | 32732.759766 | 3624.100098 | 2401.750000 | 1098.199951 | NaN | 1118.099976 | 81.769997 | NaN |
| 2010-01-06 | 735.73 | 534.46 | 2930.489990 | 1293.170044 | 2603.195557 | 3039.148438 | 22416.669922 | 13505.028320 | 1705.319946 | 10731.450195 | ... | NaN | 70729.0 | 32830.160156 | 3639.959961 | 2362.459961 | 1098.310059 | NaN | 1135.900024 | 83.180000 | NaN |
| 2010-01-07 | 734.63 | 533.34 | 2913.250000 | 1291.420044 | 2586.794189 | 3076.988770 | 22269.449219 | 13235.332031 | 1683.449951 | 10681.660156 | ... | NaN | 70451.0 | 33064.570312 | 3681.060059 | 2389.449951 | 1094.040039 | NaN | 1133.099976 | 82.660004 | NaN |
| 2010-01-08 | 738.96 | 520.90 | 2922.760010 | 1292.979980 | 2614.268311 | 3076.388916 | 22296.750000 | 13267.291992 | 1695.260010 | 10798.320312 | ... | NaN | 70263.0 | 32892.039062 | 3726.500000 | 2352.760010 | 1094.040039 | NaN | 1138.199951 | 82.750000 | NaN |
5 rows × 34 columns
# Save data
df_allStocks.to_csv('StocksData.csv')
#Get data from CSV
import pandas as pd
import numpy as np
import datetime
df = pd.read_csv('StocksData.csv')
#Convert column date to index
dti = pd.to_datetime(df['Date'])
df.index = dti
df.drop(['Date'],axis = 1,inplace = True)
df_stock = df.iloc[:,0:29]
df_stock.drop(columns = ['MOEX Russia Index'],inplace = True)
df_stock_asia = df.iloc[:,0:14]
df_stock_asean = df.iloc[:,0:7]
df_stock_europe = df.loc[:,['SET','FTSE 100','DAX PERFORMANCE-INDEX','CAC 40','ESTX 50 PR.EUR','BEL 20','MOEX Russia Index','TA-125']]
df_stock_NA = df.loc[:,['SET','Dow Jones Industrial Average','NYSE COMPOSITE (DJ)','Russell 2000','S&P/TSX Composite index','NASDAQ Composite','IPC MEXICO']]
df_commodity = df.loc[:,['SET','Gold Jun 21','Crude Oil May 21','Bitcoin USD']]
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\pandas\core\frame.py:4305: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy return super().drop(
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-9-04757ddd0938> in <module> 15 df_stock_europe = df.loc[:,['SET','FTSE 100','DAX PERFORMANCE-INDEX','CAC 40','ESTX 50 PR.EUR','BEL 20','MOEX Russia Index','TA-125']] 16 df_stock_NA = df.loc[:,['SET','Dow Jones Industrial Average','NYSE COMPOSITE (DJ)','Russell 2000','S&P/TSX Composite index','NASDAQ Composite','IPC MEXICO']] ---> 17 df_commodity = df.loc[:,['SET','Gold Jun 21','Crude Oil May 21','Bitcoin USD']] ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in __getitem__(self, key) 887 # AttributeError for IntervalTree get_value 888 return self.obj._get_value(*key, takeable=self._takeable) --> 889 return self._getitem_tuple(key) 890 else: 891 # we by definition only have the 0th axis ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_tuple(self, tup) 1067 return self._multi_take(tup) 1068 -> 1069 return self._getitem_tuple_same_dim(tup) 1070 1071 def _get_label(self, label, axis: int): ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_tuple_same_dim(self, tup) 773 continue 774 --> 775 retval = getattr(retval, self.name)._getitem_axis(key, axis=i) 776 # We should never have retval.ndim < self.ndim, as that should 777 # be handled by the _getitem_lowerdim call above. ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_axis(self, key, axis) 1111 raise ValueError("Cannot index with multidimensional key") 1112 -> 1113 return self._getitem_iterable(key, axis=axis) 1114 1115 # nested tuple slicing ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_iterable(self, key, axis) 1051 1052 # A collection of keys -> 1053 keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False) 1054 return self.obj._reindex_with_indexers( 1055 {axis: [keyarr, indexer]}, copy=True, allow_dups=True ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _get_listlike_indexer(self, key, axis, raise_missing) 1264 keyarr, indexer, new_indexer = ax._reindex_non_unique(keyarr) 1265 -> 1266 self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing) 1267 return keyarr, indexer 1268 ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _validate_read_indexer(self, key, indexer, axis, raise_missing) 1319 1320 with option_context("display.max_seq_items", 10, "display.width", 80): -> 1321 raise KeyError( 1322 "Passing list-likes to .loc or [] with any missing labels " 1323 "is no longer supported. " KeyError: "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Index(['Crude Oil May 21'], dtype='object'). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"
pd.set_option("display.max_rows", 999)
pd.set_option("display.max_columns", 999)
df_stock.describe()
| SET | VNI | STI Index | FTSE Bursa Malaysia KLCI | Composite Index | PSEi INDEX | HANG SENG INDEX | Shenzhen Component | KOSPI Composite Index | Nikkei 225 | ALL ORDINARIES | S&P/NZX 50 INDEX GROSS ( GROSS | TSEC weighted index | NIFTY 50 | Dow Jones Industrial Average | NYSE COMPOSITE (DJ) | Russell 2000 | S&P/TSX Composite index | NASDAQ Composite | FTSE 100 | DAX PERFORMANCE-INDEX | CAC 40 | ESTX 50 PR.EUR | BEL 20 | IBOVESPA | IPC MEXICO | S&P/CLX IPSA | MERVAL | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 | 3525.000000 |
| mean | 1412.059186 | 685.602247 | 3082.032875 | 1654.265137 | 5002.882500 | 6614.645471 | 24198.567828 | 10382.395802 | 2071.614778 | 17145.704310 | 5511.229104 | 6782.383392 | 9438.908977 | 8390.339593 | 19180.741413 | 10648.968089 | 1212.792838 | 14430.181933 | 5538.496569 | 6563.681216 | 10138.603681 | 4574.475479 | 3119.117354 | 3249.439944 | 69105.702411 | 42428.539184 | 4522.872113 | 17679.435649 |
| std | 255.605990 | 213.776846 | 257.393960 | 140.636756 | 963.989215 | 1439.266634 | 3154.574919 | 1811.059396 | 210.597514 | 5000.478310 | 728.352758 | 2744.411453 | 1497.979691 | 2327.060126 | 5595.237493 | 1969.718679 | 318.965648 | 1631.540464 | 2424.766373 | 703.135040 | 2365.334144 | 746.535898 | 394.031386 | 566.942050 | 19219.834856 | 4812.958395 | 607.616075 | 14088.266851 |
| min | 685.890000 | 336.730000 | 2233.479980 | 1219.719971 | 2475.475586 | 2796.890869 | 16250.269531 | 6998.111816 | 1457.640015 | 8160.009766 | 3927.600098 | 2933.820068 | 6633.299316 | 4544.200195 | 9686.480469 | 6434.810059 | 586.489990 | 11092.500000 | 2091.790039 | 4805.799805 | 5072.330078 | 2781.679932 | 1995.010010 | 1916.260010 | 37497.000000 | 30368.080078 | 3391.310059 | 2061.070068 |
| 25% | 1282.680000 | 505.120000 | 2880.760010 | 1575.010010 | 4357.973633 | 5841.377930 | 21926.880859 | 9167.650391 | 1947.670044 | 13485.139648 | 4981.899902 | 4473.379883 | 8280.219727 | 5987.700195 | 14897.549805 | 9187.790039 | 968.159973 | 12925.099609 | 3409.169922 | 5963.600098 | 8057.750000 | 4013.120117 | 2855.370117 | 2701.500000 | 54110.000000 | 39066.011719 | 3951.439941 | 3523.590088 |
| 50% | 1479.070000 | 611.550000 | 3136.260010 | 1665.709961 | 5068.430664 | 7101.723633 | 23678.410156 | 10313.454102 | 2028.989990 | 18264.789062 | 5498.500000 | 6418.129883 | 9206.528320 | 8342.150391 | 17946.679688 | 10835.900391 | 1210.140015 | 14673.500000 | 5032.750000 | 6627.200195 | 10598.929688 | 4549.560059 | 3165.199951 | 3420.050049 | 63761.000000 | 43179.851562 | 4422.359863 | 12899.459961 |
| 75% | 1590.130000 | 908.180000 | 3267.479980 | 1766.829956 | 5832.311035 | 7750.117188 | 26521.849609 | 11324.632812 | 2170.250000 | 21382.619141 | 6030.299805 | 8806.040039 | 10558.290039 | 10526.750000 | 24713.980469 | 12402.740234 | 1500.699951 | 15668.900391 | 7354.339844 | 7198.700195 | 12222.389648 | 5206.220215 | 3444.149902 | 3708.659912 | 80963.000000 | 45563.179688 | 5058.879883 | 29883.269531 |
| max | 1838.960000 | 1204.330000 | 3615.280029 | 1895.180054 | 6689.287109 | 9056.291016 | 33154.121094 | 18098.068359 | 2873.469971 | 27568.150391 | 7255.200195 | 13246.769531 | 14687.700195 | 13981.950195 | 30409.560547 | 14516.730469 | 2007.099976 | 17944.099609 | 12899.419922 | 7877.500000 | 13790.290039 | 6111.240234 | 3865.179932 | 4198.310059 | 119528.000000 | 51713.378906 | 5880.470215 | 55427.261719 |
#Correlation Table
pd.set_option("display.max_rows", 999)
pd.set_option("display.max_columns", 999)
df_stock.corr()
| SET | VNI | STI Index | FTSE Bursa Malaysia KLCI | Composite Index | PSEi INDEX | HANG SENG INDEX | Shenzhen Component | KOSPI Composite Index | Nikkei 225 | ALL ORDINARIES | S&P/NZX 50 INDEX GROSS ( GROSS | TSEC weighted index | NIFTY 50 | Dow Jones Industrial Average | NYSE COMPOSITE (DJ) | Russell 2000 | S&P/TSX Composite index | NASDAQ Composite | FTSE 100 | DAX PERFORMANCE-INDEX | CAC 40 | ESTX 50 PR.EUR | BEL 20 | IBOVESPA | IPC MEXICO | S&P/CLX IPSA | MERVAL | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SET | 1.000000 | 0.678796 | 0.579589 | 0.765398 | 0.930763 | 0.949605 | 0.726527 | -0.250413 | 0.638743 | 0.745891 | 0.721104 | 0.590416 | 0.540782 | 0.713253 | 0.713417 | 0.817057 | 0.805186 | 0.729641 | 0.556123 | 0.892773 | 0.800119 | 0.740441 | 0.682687 | 0.778283 | 0.282710 | 0.851612 | 0.425375 | 0.547686 |
| VNI | 0.678796 | 1.000000 | 0.223251 | 0.224973 | 0.833706 | 0.648957 | 0.833698 | 0.004059 | 0.713958 | 0.883332 | 0.889763 | 0.896249 | 0.867493 | 0.934390 | 0.941056 | 0.900827 | 0.912509 | 0.855117 | 0.877600 | 0.701510 | 0.847282 | 0.867911 | 0.711546 | 0.767725 | 0.783535 | 0.471627 | 0.769528 | 0.916633 |
| STI Index | 0.579589 | 0.223251 | 1.000000 | 0.656062 | 0.454890 | 0.480873 | 0.617234 | -0.146534 | 0.368558 | 0.197921 | 0.308117 | -0.047354 | 0.115254 | 0.184893 | 0.133971 | 0.293905 | 0.265511 | 0.321612 | -0.056897 | 0.656492 | 0.275406 | 0.379804 | 0.474652 | 0.379616 | 0.025887 | 0.512257 | 0.237185 | -0.027157 |
| FTSE Bursa Malaysia KLCI | 0.765398 | 0.224973 | 0.656062 | 1.000000 | 0.586250 | 0.725268 | 0.423393 | -0.314384 | 0.468035 | 0.371315 | 0.325498 | 0.103580 | 0.170389 | 0.268056 | 0.261689 | 0.457218 | 0.439266 | 0.378815 | 0.123902 | 0.674271 | 0.465143 | 0.384699 | 0.464351 | 0.499997 | -0.202773 | 0.756679 | 0.010240 | 0.075394 |
| Composite Index | 0.930763 | 0.833706 | 0.454890 | 0.586250 | 1.000000 | 0.914346 | 0.801098 | -0.156089 | 0.710760 | 0.842663 | 0.847835 | 0.775770 | 0.722529 | 0.872027 | 0.867009 | 0.913948 | 0.905004 | 0.850075 | 0.735472 | 0.877640 | 0.879475 | 0.840650 | 0.732157 | 0.824814 | 0.533796 | 0.753600 | 0.597018 | 0.748854 |
| PSEi INDEX | 0.949605 | 0.648957 | 0.480873 | 0.725268 | 0.914346 | 1.000000 | 0.662644 | -0.137443 | 0.599712 | 0.785313 | 0.732631 | 0.616157 | 0.536497 | 0.734078 | 0.707568 | 0.822616 | 0.801437 | 0.722809 | 0.569709 | 0.857845 | 0.838250 | 0.769850 | 0.735818 | 0.850925 | 0.224667 | 0.866538 | 0.311173 | 0.549806 |
| HANG SENG INDEX | 0.726527 | 0.833698 | 0.617234 | 0.423393 | 0.801098 | 0.662644 | 1.000000 | 0.118478 | 0.774764 | 0.765421 | 0.802615 | 0.660414 | 0.760699 | 0.793711 | 0.769537 | 0.808240 | 0.803244 | 0.807991 | 0.663970 | 0.801807 | 0.779915 | 0.838252 | 0.784281 | 0.756709 | 0.627924 | 0.554397 | 0.750542 | 0.703757 |
| Shenzhen Component | -0.250413 | 0.004059 | -0.146534 | -0.314384 | -0.156089 | -0.137443 | 0.118478 | 1.000000 | 0.201384 | 0.136688 | 0.066949 | 0.091071 | 0.258026 | 0.089191 | 0.024877 | 0.010132 | 0.011570 | 0.103521 | 0.158902 | -0.171261 | 0.121784 | 0.130258 | 0.226027 | 0.156673 | 0.109271 | -0.151050 | 0.064019 | 0.135765 |
| KOSPI Composite Index | 0.638743 | 0.713958 | 0.368558 | 0.468035 | 0.710760 | 0.599712 | 0.774764 | 0.201384 | 1.000000 | 0.703060 | 0.668694 | 0.621528 | 0.781510 | 0.716922 | 0.714309 | 0.752169 | 0.775535 | 0.746649 | 0.685419 | 0.660027 | 0.759520 | 0.707588 | 0.656835 | 0.682131 | 0.506827 | 0.615910 | 0.694757 | 0.687437 |
| Nikkei 225 | 0.745891 | 0.883332 | 0.197921 | 0.371315 | 0.842663 | 0.785313 | 0.765421 | 0.136688 | 0.703060 | 1.000000 | 0.918797 | 0.900342 | 0.865482 | 0.944977 | 0.938841 | 0.960545 | 0.961338 | 0.887785 | 0.900768 | 0.743441 | 0.967325 | 0.936241 | 0.858848 | 0.900803 | 0.582278 | 0.590715 | 0.527461 | 0.874725 |
| ALL ORDINARIES | 0.721104 | 0.889763 | 0.308117 | 0.325498 | 0.847835 | 0.732631 | 0.802615 | 0.066949 | 0.668694 | 0.918797 | 1.000000 | 0.896251 | 0.889898 | 0.941006 | 0.930827 | 0.956646 | 0.939645 | 0.951447 | 0.870553 | 0.795944 | 0.916446 | 0.951616 | 0.866980 | 0.845549 | 0.721202 | 0.531847 | 0.576581 | 0.862587 |
| S&P/NZX 50 INDEX GROSS ( GROSS | 0.590416 | 0.896249 | -0.047354 | 0.103580 | 0.775770 | 0.616157 | 0.660414 | 0.091071 | 0.621528 | 0.900342 | 0.896251 | 1.000000 | 0.912758 | 0.947996 | 0.972963 | 0.907720 | 0.904983 | 0.855302 | 0.979552 | 0.571078 | 0.867327 | 0.830867 | 0.665927 | 0.718244 | 0.788127 | 0.376573 | 0.641332 | 0.969789 |
| TSEC weighted index | 0.540782 | 0.867493 | 0.115254 | 0.170389 | 0.722529 | 0.536497 | 0.760699 | 0.258026 | 0.781510 | 0.865482 | 0.889898 | 0.912758 | 1.000000 | 0.914836 | 0.917941 | 0.889640 | 0.886336 | 0.904244 | 0.945746 | 0.586803 | 0.853723 | 0.837630 | 0.740002 | 0.712703 | 0.795125 | 0.355968 | 0.698466 | 0.929105 |
| NIFTY 50 | 0.713253 | 0.934390 | 0.184893 | 0.268056 | 0.872027 | 0.734078 | 0.793711 | 0.089191 | 0.716922 | 0.944977 | 0.941006 | 0.947996 | 0.914836 | 1.000000 | 0.972543 | 0.957497 | 0.956418 | 0.924175 | 0.933542 | 0.718494 | 0.925883 | 0.915865 | 0.793679 | 0.837554 | 0.744325 | 0.533736 | 0.668409 | 0.936350 |
| Dow Jones Industrial Average | 0.713417 | 0.941056 | 0.133971 | 0.261689 | 0.867009 | 0.707568 | 0.769537 | 0.024877 | 0.714309 | 0.938841 | 0.930827 | 0.972963 | 0.917941 | 0.972543 | 1.000000 | 0.964870 | 0.964519 | 0.907297 | 0.963451 | 0.701424 | 0.917777 | 0.888613 | 0.737684 | 0.783063 | 0.770895 | 0.495244 | 0.690586 | 0.959419 |
| NYSE COMPOSITE (DJ) | 0.817057 | 0.900827 | 0.293905 | 0.457218 | 0.913948 | 0.822616 | 0.808240 | 0.010132 | 0.752169 | 0.960545 | 0.956646 | 0.907720 | 0.889640 | 0.957497 | 0.964870 | 1.000000 | 0.988640 | 0.950604 | 0.901132 | 0.819623 | 0.965045 | 0.937558 | 0.844744 | 0.874851 | 0.643134 | 0.639807 | 0.584672 | 0.879689 |
| Russell 2000 | 0.805186 | 0.912509 | 0.265511 | 0.439266 | 0.905004 | 0.801437 | 0.803244 | 0.011570 | 0.775535 | 0.961338 | 0.939645 | 0.904983 | 0.886336 | 0.956418 | 0.964519 | 0.988640 | 1.000000 | 0.936176 | 0.905901 | 0.813391 | 0.960181 | 0.927040 | 0.819500 | 0.865611 | 0.640475 | 0.644582 | 0.611575 | 0.886647 |
| S&P/TSX Composite index | 0.729641 | 0.855117 | 0.321612 | 0.378815 | 0.850075 | 0.722809 | 0.807991 | 0.103521 | 0.746649 | 0.887785 | 0.951447 | 0.855302 | 0.904244 | 0.924175 | 0.907297 | 0.950604 | 0.936176 | 1.000000 | 0.853574 | 0.803493 | 0.916762 | 0.919350 | 0.854173 | 0.839443 | 0.680719 | 0.571499 | 0.604146 | 0.841768 |
| NASDAQ Composite | 0.556123 | 0.877600 | -0.056897 | 0.123902 | 0.735472 | 0.569709 | 0.663970 | 0.158902 | 0.685419 | 0.900768 | 0.870553 | 0.979552 | 0.945746 | 0.933542 | 0.963451 | 0.901132 | 0.905901 | 0.853574 | 1.000000 | 0.528797 | 0.862456 | 0.807150 | 0.662099 | 0.690204 | 0.776643 | 0.346934 | 0.642698 | 0.973648 |
| FTSE 100 | 0.892773 | 0.701510 | 0.656492 | 0.674271 | 0.877640 | 0.857845 | 0.801807 | -0.171261 | 0.660027 | 0.743441 | 0.795944 | 0.571078 | 0.586803 | 0.718494 | 0.701424 | 0.819623 | 0.813391 | 0.803493 | 0.528797 | 1.000000 | 0.819850 | 0.844900 | 0.817919 | 0.843177 | 0.363324 | 0.822144 | 0.468545 | 0.538639 |
| DAX PERFORMANCE-INDEX | 0.800119 | 0.847282 | 0.275406 | 0.465143 | 0.879475 | 0.838250 | 0.779915 | 0.121784 | 0.759520 | 0.967325 | 0.916446 | 0.867327 | 0.853723 | 0.925883 | 0.917777 | 0.965045 | 0.960181 | 0.916762 | 0.862456 | 0.819850 | 1.000000 | 0.951452 | 0.896506 | 0.938523 | 0.538490 | 0.690767 | 0.535552 | 0.835107 |
| CAC 40 | 0.740441 | 0.867911 | 0.379804 | 0.384699 | 0.840650 | 0.769850 | 0.838252 | 0.130258 | 0.707588 | 0.936241 | 0.951616 | 0.830867 | 0.837630 | 0.915865 | 0.888613 | 0.937558 | 0.927040 | 0.919350 | 0.807150 | 0.844900 | 0.951452 | 1.000000 | 0.950645 | 0.939020 | 0.616444 | 0.621412 | 0.566260 | 0.804742 |
| ESTX 50 PR.EUR | 0.682687 | 0.711546 | 0.474652 | 0.464351 | 0.732157 | 0.735818 | 0.784281 | 0.226027 | 0.656835 | 0.858848 | 0.866980 | 0.665927 | 0.740002 | 0.793679 | 0.737684 | 0.844744 | 0.819500 | 0.854173 | 0.662099 | 0.817919 | 0.896506 | 0.950645 | 1.000000 | 0.935374 | 0.435410 | 0.623699 | 0.390499 | 0.640020 |
| BEL 20 | 0.778283 | 0.767725 | 0.379616 | 0.499997 | 0.824814 | 0.850925 | 0.756709 | 0.156673 | 0.682131 | 0.900803 | 0.845549 | 0.718244 | 0.712703 | 0.837554 | 0.783063 | 0.874851 | 0.865611 | 0.839443 | 0.690204 | 0.843177 | 0.938523 | 0.939020 | 0.935374 | 1.000000 | 0.381365 | 0.761899 | 0.424306 | 0.682211 |
| IBOVESPA | 0.282710 | 0.783535 | 0.025887 | -0.202773 | 0.533796 | 0.224667 | 0.627924 | 0.109271 | 0.506827 | 0.582278 | 0.721202 | 0.788127 | 0.795125 | 0.744325 | 0.770895 | 0.643134 | 0.640475 | 0.680719 | 0.776643 | 0.363324 | 0.538490 | 0.616444 | 0.435410 | 0.381365 | 1.000000 | 0.029527 | 0.790685 | 0.839547 |
| IPC MEXICO | 0.851612 | 0.471627 | 0.512257 | 0.756679 | 0.753600 | 0.866538 | 0.554397 | -0.151050 | 0.615910 | 0.590715 | 0.531847 | 0.376573 | 0.355968 | 0.533736 | 0.495244 | 0.639807 | 0.644582 | 0.571499 | 0.346934 | 0.822144 | 0.690767 | 0.621412 | 0.623699 | 0.761899 | 0.029527 | 1.000000 | 0.259620 | 0.332306 |
| S&P/CLX IPSA | 0.425375 | 0.769528 | 0.237185 | 0.010240 | 0.597018 | 0.311173 | 0.750542 | 0.064019 | 0.694757 | 0.527461 | 0.576581 | 0.641332 | 0.698466 | 0.668409 | 0.690586 | 0.584672 | 0.611575 | 0.604146 | 0.642698 | 0.468545 | 0.535552 | 0.566260 | 0.390499 | 0.424306 | 0.790685 | 0.259620 | 1.000000 | 0.727716 |
| MERVAL | 0.547686 | 0.916633 | -0.027157 | 0.075394 | 0.748854 | 0.549806 | 0.703757 | 0.135765 | 0.687437 | 0.874725 | 0.862587 | 0.969789 | 0.929105 | 0.936350 | 0.959419 | 0.879689 | 0.886647 | 0.841768 | 0.973648 | 0.538639 | 0.835107 | 0.804742 | 0.640020 | 0.682211 | 0.839547 | 0.332306 | 0.727716 | 1.000000 |
#Time Series Analysis
# Plot
import matplotlib.pyplot as plt
fig, axes = plt.subplots(nrows=3, ncols=2, dpi=120, figsize=(10,8))
for i, ax in enumerate(axes.flatten()):
data = df_stock[df_stock.columns[i]]
ax.plot(data, color='red', linewidth=1)
ax.set_title(df_stock.columns[i])
ax.xaxis.set_ticks_position('none')
ax.yaxis.set_ticks_position('none')
ax.spines['top'].set_alpha(0)
ax.tick_params(labelsize=6)
plt.tight_layout();
#Normal Test
from scipy import stats
for i in df_stock:
print(df_stock[i])
stat,p = stats.normaltest(df_stock[i])
print("Statistics = %.3f, p=%.3f" % (stat,p))
alpha = 0.05
if p> alpha:
print('Data looks Gaussian (fail to reject null hypothesis)')
else:
print('Data looks non-Gaussian (reject null hypothesis)')
Date
2010-01-04 732.28
2010-01-05 732.11
2010-01-06 735.73
2010-01-07 734.63
2010-01-08 738.96
...
2020-12-27 1486.31
2020-12-28 1452.67
2020-12-29 1461.95
2020-12-30 1449.35
2020-12-31 1449.35
Name: SET, Length: 3525, dtype: float64
Statistics = 327.845, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 517.05
2010-01-05 532.53
2010-01-06 534.46
2010-01-07 533.34
2010-01-08 520.90
...
2020-12-27 1084.42
2020-12-28 1091.33
2020-12-29 1099.49
2020-12-30 1097.54
2020-12-31 1103.87
Name: VNI, Length: 3525, dtype: float64
Statistics = 1971.708, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 2894.550049
2010-01-05 2920.280029
2010-01-06 2930.489990
2010-01-07 2913.250000
2010-01-08 2922.760010
...
2020-12-27 2833.399902
2020-12-28 2840.139893
2020-12-29 2848.139893
2020-12-30 2869.219971
2020-12-31 2869.219971
Name: STI Index, Length: 3525, dtype: float64
Statistics = 165.245, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 1275.750000
2010-01-05 1288.239990
2010-01-06 1293.170044
2010-01-07 1291.420044
2010-01-08 1292.979980
...
2020-12-27 1641.170044
2020-12-28 1643.900024
2020-12-29 1634.989990
2020-12-30 1644.410034
2020-12-31 1644.410034
Name: FTSE Bursa Malaysia KLCI, Length: 3525, dtype: float64
Statistics = 216.183, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 2575.312988
2010-01-05 2605.175537
2010-01-06 2603.195557
2010-01-07 2586.794189
2010-01-08 2614.268311
...
2020-12-27 6008.708984
2020-12-28 6093.554199
2020-12-29 6036.173828
2020-12-30 5979.073242
2020-12-31 5979.073242
Name: Composite Index, Length: 3525, dtype: float64
Statistics = 145.662, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 3004.237549
2010-01-05 3027.681396
2010-01-06 3039.148438
2010-01-07 3076.988770
2010-01-08 3076.388916
...
2020-12-27 7204.379883
2020-12-28 7122.250000
2020-12-29 7139.709961
2020-12-30 7139.709961
2020-12-31 7139.709961
Name: PSEi INDEX, Length: 3525, dtype: float64
Statistics = 374.266, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 21823.279297
2010-01-05 22279.580078
2010-01-06 22416.669922
2010-01-07 22269.449219
2010-01-08 22296.750000
...
2020-12-27 26386.560547
2020-12-28 26314.630859
2020-12-29 26568.490234
2020-12-30 27147.109375
2020-12-31 27147.109375
Name: HANG SENG INDEX, Length: 3525, dtype: float64
Statistics = 142.878, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 13533.387695
2010-01-05 13517.228516
2010-01-06 13505.028320
2010-01-07 13235.332031
2010-01-08 13267.291992
...
2020-12-27 14017.059570
2020-12-28 14044.099609
2020-12-29 13970.209961
2020-12-30 14201.570312
2020-12-31 14201.570312
Name: Shenzhen Component, Length: 3525, dtype: float64
Statistics = 240.029, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 1696.140015
2010-01-05 1690.619995
2010-01-06 1705.319946
2010-01-07 1683.449951
2010-01-08 1695.260010
...
2020-12-27 2806.860107
2020-12-28 2808.600098
2020-12-29 2820.510010
2020-12-30 2873.469971
2020-12-31 2873.469971
Name: KOSPI Composite Index, Length: 3525, dtype: float64
Statistics = 232.136, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 10654.790039
2010-01-05 10681.830078
2010-01-06 10731.450195
2010-01-07 10681.660156
2010-01-08 10798.320312
...
2020-12-27 26656.609375
2020-12-28 26854.029297
2020-12-29 27568.150391
2020-12-30 27444.169922
2020-12-31 27444.169922
Name: Nikkei 225, Length: 3525, dtype: float64
Statistics = 1477.934, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 4889.799805
2010-01-05 4939.500000
2010-01-06 4946.799805
2010-01-07 4930.500000
2010-01-08 4942.200195
...
2020-12-27 6917.500000
2020-12-28 6917.500000
2020-12-29 6962.100098
2020-12-30 6942.899902
2020-12-31 6942.899902
Name: ALL ORDINARIES, Length: 3525, dtype: float64
Statistics = 126.560, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 3230.149902
2010-01-05 3268.189941
2010-01-06 3271.570068
2010-01-07 3284.810059
2010-01-08 3310.229980
...
2020-12-27 13020.209961
2020-12-28 13020.209961
2020-12-29 13246.769531
2020-12-30 13217.139648
2020-12-31 13217.139648
Name: S&P/NZX 50 INDEX GROSS ( GROSS , Length: 3525, dtype: float64
Statistics = 606.674, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 8207.809570
2010-01-05 8211.360352
2010-01-06 8327.580078
2010-01-07 8237.379883
2010-01-08 8280.860352
...
2020-12-27 14331.419922
2020-12-28 14483.070312
2020-12-29 14472.049805
2020-12-30 14687.700195
2020-12-31 14687.700195
Name: TSEC weighted index, Length: 3525, dtype: float64
Statistics = 202.919, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 5232.200195
2010-01-05 5277.899902
2010-01-06 5281.799805
2010-01-07 5263.100098
2010-01-08 5244.750000
...
2020-12-27 13749.250000
2020-12-28 13873.200195
2020-12-29 13932.599609
2020-12-30 13981.950195
2020-12-31 13981.950195
Name: NIFTY 50, Length: 3525, dtype: float64
Statistics = 2722.887, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 10583.959961
2010-01-05 10572.019531
2010-01-06 10573.679688
2010-01-07 10606.860352
2010-01-08 10618.190430
...
2020-12-27 30199.869141
2020-12-28 30403.970703
2020-12-29 30335.669922
2020-12-30 30409.560547
2020-12-31 30409.560547
Name: Dow Jones Industrial Average, Length: 3525, dtype: float64
Statistics = 2424.900, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 7326.740234
2010-01-05 7354.870117
2010-01-06 7377.700195
2010-01-07 7393.930176
2010-01-08 7425.350098
...
2020-12-27 14382.500000
2020-12-28 14405.769531
2020-12-29 14397.919922
2020-12-30 14477.480469
2020-12-31 14477.480469
Name: NYSE COMPOSITE (DJ), Length: 3525, dtype: float64
Statistics = 545.752, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 640.099976
2010-01-05 638.489990
2010-01-06 637.950012
2010-01-07 641.969971
2010-01-08 644.559998
...
2020-12-27 2003.949951
2020-12-28 1996.250000
2020-12-29 1959.359985
2020-12-30 1979.989990
2020-12-31 1979.989990
Name: Russell 2000, Length: 3525, dtype: float64
Statistics = 607.387, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 11866.900391
2010-01-05 11888.099609
2010-01-06 11944.500000
2010-01-07 11887.500000
2010-01-08 11953.799805
...
2020-12-27 17623.900391
2020-12-28 17623.900391
2020-12-29 17543.400391
2020-12-30 17545.800781
2020-12-31 17545.800781
Name: S&P/TSX Composite index, Length: 3525, dtype: float64
Statistics = 1081.625, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 2308.419922
2010-01-05 2308.709961
2010-01-06 2301.090088
2010-01-07 2300.050049
2010-01-08 2317.169922
...
2020-12-27 12804.730469
2020-12-28 12899.419922
2020-12-29 12850.219727
2020-12-30 12870.000000
2020-12-31 12870.000000
Name: NASDAQ Composite, Length: 3525, dtype: float64
Statistics = 227.209, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 5500.299805
2010-01-05 5522.500000
2010-01-06 5530.000000
2010-01-07 5526.700195
2010-01-08 5534.200195
...
2020-12-27 6502.100098
2020-12-28 6502.100098
2020-12-29 6602.700195
2020-12-30 6555.799805
2020-12-31 6555.799805
Name: FTSE 100, Length: 3525, dtype: float64
Statistics = 834.565, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 6048.299805
2010-01-05 6031.859863
2010-01-06 6034.330078
2010-01-07 6019.359863
2010-01-08 6037.609863
...
2020-12-27 13587.230469
2020-12-28 13790.290039
2020-12-29 13761.379883
2020-12-30 13718.780273
2020-12-31 13718.780273
Name: DAX PERFORMANCE-INDEX, Length: 3525, dtype: float64
Statistics = 1286.115, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 4013.969971
2010-01-05 4012.909912
2010-01-06 4017.669922
2010-01-07 4024.800049
2010-01-08 4045.139893
...
2020-12-27 5522.009766
2020-12-28 5588.379883
2020-12-29 5611.790039
2020-12-30 5599.410156
2020-12-31 5599.410156
Name: CAC 40, Length: 3525, dtype: float64
Statistics = 347.044, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 3017.800049
2010-01-05 3012.360107
2010-01-06 3009.659912
2010-01-07 3007.340088
2010-01-08 3017.850098
...
2020-12-27 3539.260010
2020-12-28 3575.409912
2020-12-29 3581.370117
2020-12-30 3571.590088
2020-12-31 3571.590088
Name: ESTX 50 PR.EUR, Length: 3525, dtype: float64
Statistics = 178.963, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 2563.969971
2010-01-05 2587.770020
2010-01-06 2596.429932
2010-01-07 2590.679932
2010-01-08 2591.639893
...
2020-12-27 3659.159912
2020-12-28 3663.060059
2020-12-29 3671.110107
2020-12-30 3663.060059
2020-12-31 3663.060059
Name: BEL 20, Length: 3525, dtype: float64
Statistics = 766.074, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 70045.0
2010-01-05 70240.0
2010-01-06 70729.0
2010-01-07 70451.0
2010-01-08 70263.0
...
2020-12-27 117857.0
2020-12-28 119051.0
2020-12-29 119475.0
2020-12-30 119306.0
2020-12-31 119306.0
Name: IBOVESPA, Length: 3525, dtype: float64
Statistics = 333.774, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 32758.529297
2010-01-05 32732.759766
2010-01-06 32830.160156
2010-01-07 33064.570312
2010-01-08 32892.039062
...
2020-12-27 43372.199219
2020-12-28 43883.410156
2020-12-29 44693.988281
2020-12-30 44693.960938
2020-12-31 44693.960938
Name: IPC MEXICO, Length: 3525, dtype: float64
Statistics = 152.794, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 3620.699951
2010-01-05 3624.100098
2010-01-06 3639.959961
2010-01-07 3681.060059
2010-01-08 3726.500000
...
2020-12-27 5058.879883
2020-12-28 5058.879883
2020-12-29 5058.879883
2020-12-30 5058.879883
2020-12-31 5058.879883
Name: S&P/CLX IPSA, Length: 3525, dtype: float64
Statistics = 9015.287, p=0.000
Data looks non-Gaussian (reject null hypothesis)
Date
2010-01-04 2384.489990
2010-01-05 2401.750000
2010-01-06 2362.459961
2010-01-07 2389.449951
2010-01-08 2352.760010
...
2020-12-27 51618.980469
2020-12-28 50483.839844
2020-12-29 51320.140625
2020-12-30 51226.488281
2020-12-31 51226.488281
Name: MERVAL, Length: 3525, dtype: float64
Statistics = 417.720, p=0.000
Data looks non-Gaussian (reject null hypothesis)
# !pip install statsmodels
#Auto-correlation (ACF)
import matplotlib.pyplot as plt
import statsmodels.api as sm
from statsmodels.tsa.stattools import acf, pacf
for i in df_stock:
sm.graphics.tsa.plot_acf(df_stock[i],lags = 50)
plt.title('ACF for %s' %i)
plt.show()
#Partial Auto-correlation (PACF)
import matplotlib.pyplot as plt
import statsmodels.api as sm
from statsmodels.tsa.stattools import acf, pacf
for i in df_stock:
sm.graphics.tsa.plot_pacf(df_stock[i],lags = 50)
plt.title('PACF for %s' %i)
plt.show()
#Stationary Check
#Augmentated Dickey Fuller Test
from statsmodels.tsa.stattools import adfuller
def augmented_dickey_fuller_statistics(time_series):
result = adfuller(time_series.values)
print('ADF Statistic: %f' % result[0])
print('p-value: %f' % result[1])
print('Critical Values:')
for key, value in result[4].items():
print('\t%s: %.3f' % (key, value))
#Split Training Data(70%)/Validation Data(30%)
n_obs = 2467 #For traning data
X_train = df_stock[0:n_obs]
X_validation = df_stock[n_obs:]
print(X_train.shape,X_validation.shape)
(2467, 28) (1058, 28)
for i in df_stock:
print(df_stock[i])
augmented_dickey_fuller_statistics(df_stock[i])
Date
2010-01-04 732.28
2010-01-05 732.11
2010-01-06 735.73
2010-01-07 734.63
2010-01-08 738.96
...
2020-12-27 1486.31
2020-12-28 1452.67
2020-12-29 1461.95
2020-12-30 1449.35
2020-12-31 1449.35
Name: SET, Length: 3525, dtype: float64
ADF Statistic: -2.636441
p-value: 0.085697
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 517.05
2010-01-05 532.53
2010-01-06 534.46
2010-01-07 533.34
2010-01-08 520.90
...
2020-12-27 1084.42
2020-12-28 1091.33
2020-12-29 1099.49
2020-12-30 1097.54
2020-12-31 1103.87
Name: VNI, Length: 3525, dtype: float64
ADF Statistic: -0.400646
p-value: 0.909991
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 2894.550049
2010-01-05 2920.280029
2010-01-06 2930.489990
2010-01-07 2913.250000
2010-01-08 2922.760010
...
2020-12-27 2833.399902
2020-12-28 2840.139893
2020-12-29 2848.139893
2020-12-30 2869.219971
2020-12-31 2869.219971
Name: STI Index, Length: 3525, dtype: float64
ADF Statistic: -3.098446
p-value: 0.026668
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 1275.750000
2010-01-05 1288.239990
2010-01-06 1293.170044
2010-01-07 1291.420044
2010-01-08 1292.979980
...
2020-12-27 1641.170044
2020-12-28 1643.900024
2020-12-29 1634.989990
2020-12-30 1644.410034
2020-12-31 1644.410034
Name: FTSE Bursa Malaysia KLCI, Length: 3525, dtype: float64
ADF Statistic: -2.818629
p-value: 0.055662
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 2575.312988
2010-01-05 2605.175537
2010-01-06 2603.195557
2010-01-07 2586.794189
2010-01-08 2614.268311
...
2020-12-27 6008.708984
2020-12-28 6093.554199
2020-12-29 6036.173828
2020-12-30 5979.073242
2020-12-31 5979.073242
Name: Composite Index, Length: 3525, dtype: float64
ADF Statistic: -2.290011
p-value: 0.175210
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 3004.237549
2010-01-05 3027.681396
2010-01-06 3039.148438
2010-01-07 3076.988770
2010-01-08 3076.388916
...
2020-12-27 7204.379883
2020-12-28 7122.250000
2020-12-29 7139.709961
2020-12-30 7139.709961
2020-12-31 7139.709961
Name: PSEi INDEX, Length: 3525, dtype: float64
ADF Statistic: -2.489856
p-value: 0.117962
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 21823.279297
2010-01-05 22279.580078
2010-01-06 22416.669922
2010-01-07 22269.449219
2010-01-08 22296.750000
...
2020-12-27 26386.560547
2020-12-28 26314.630859
2020-12-29 26568.490234
2020-12-30 27147.109375
2020-12-31 27147.109375
Name: HANG SENG INDEX, Length: 3525, dtype: float64
ADF Statistic: -2.227299
p-value: 0.196487
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 13533.387695
2010-01-05 13517.228516
2010-01-06 13505.028320
2010-01-07 13235.332031
2010-01-08 13267.291992
...
2020-12-27 14017.059570
2020-12-28 14044.099609
2020-12-29 13970.209961
2020-12-30 14201.570312
2020-12-31 14201.570312
Name: Shenzhen Component, Length: 3525, dtype: float64
ADF Statistic: -2.614902
p-value: 0.089956
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 1696.140015
2010-01-05 1690.619995
2010-01-06 1705.319946
2010-01-07 1683.449951
2010-01-08 1695.260010
...
2020-12-27 2806.860107
2020-12-28 2808.600098
2020-12-29 2820.510010
2020-12-30 2873.469971
2020-12-31 2873.469971
Name: KOSPI Composite Index, Length: 3525, dtype: float64
ADF Statistic: -1.654611
p-value: 0.454637
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 10654.790039
2010-01-05 10681.830078
2010-01-06 10731.450195
2010-01-07 10681.660156
2010-01-08 10798.320312
...
2020-12-27 26656.609375
2020-12-28 26854.029297
2020-12-29 27568.150391
2020-12-30 27444.169922
2020-12-31 27444.169922
Name: Nikkei 225, Length: 3525, dtype: float64
ADF Statistic: -0.616362
p-value: 0.867242
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 4889.799805
2010-01-05 4939.500000
2010-01-06 4946.799805
2010-01-07 4930.500000
2010-01-08 4942.200195
...
2020-12-27 6917.500000
2020-12-28 6917.500000
2020-12-29 6962.100098
2020-12-30 6942.899902
2020-12-31 6942.899902
Name: ALL ORDINARIES, Length: 3525, dtype: float64
ADF Statistic: -1.557438
p-value: 0.504931
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 3230.149902
2010-01-05 3268.189941
2010-01-06 3271.570068
2010-01-07 3284.810059
2010-01-08 3310.229980
...
2020-12-27 13020.209961
2020-12-28 13020.209961
2020-12-29 13246.769531
2020-12-30 13217.139648
2020-12-31 13217.139648
Name: S&P/NZX 50 INDEX GROSS ( GROSS , Length: 3525, dtype: float64
ADF Statistic: 0.995453
p-value: 0.994218
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 8207.809570
2010-01-05 8211.360352
2010-01-06 8327.580078
2010-01-07 8237.379883
2010-01-08 8280.860352
...
2020-12-27 14331.419922
2020-12-28 14483.070312
2020-12-29 14472.049805
2020-12-30 14687.700195
2020-12-31 14687.700195
Name: TSEC weighted index, Length: 3525, dtype: float64
ADF Statistic: 0.404927
p-value: 0.981678
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 5232.200195
2010-01-05 5277.899902
2010-01-06 5281.799805
2010-01-07 5263.100098
2010-01-08 5244.750000
...
2020-12-27 13749.250000
2020-12-28 13873.200195
2020-12-29 13932.599609
2020-12-30 13981.950195
2020-12-31 13981.950195
Name: NIFTY 50, Length: 3525, dtype: float64
ADF Statistic: -0.369051
p-value: 0.915139
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 10583.959961
2010-01-05 10572.019531
2010-01-06 10573.679688
2010-01-07 10606.860352
2010-01-08 10618.190430
...
2020-12-27 30199.869141
2020-12-28 30403.970703
2020-12-29 30335.669922
2020-12-30 30409.560547
2020-12-31 30409.560547
Name: Dow Jones Industrial Average, Length: 3525, dtype: float64
ADF Statistic: -0.487059
p-value: 0.894517
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 7326.740234
2010-01-05 7354.870117
2010-01-06 7377.700195
2010-01-07 7393.930176
2010-01-08 7425.350098
...
2020-12-27 14382.500000
2020-12-28 14405.769531
2020-12-29 14397.919922
2020-12-30 14477.480469
2020-12-31 14477.480469
Name: NYSE COMPOSITE (DJ), Length: 3525, dtype: float64
ADF Statistic: -1.347404
p-value: 0.607216
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 640.099976
2010-01-05 638.489990
2010-01-06 637.950012
2010-01-07 641.969971
2010-01-08 644.559998
...
2020-12-27 2003.949951
2020-12-28 1996.250000
2020-12-29 1959.359985
2020-12-30 1979.989990
2020-12-31 1979.989990
Name: Russell 2000, Length: 3525, dtype: float64
ADF Statistic: -1.042687
p-value: 0.737379
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 11866.900391
2010-01-05 11888.099609
2010-01-06 11944.500000
2010-01-07 11887.500000
2010-01-08 11953.799805
...
2020-12-27 17623.900391
2020-12-28 17623.900391
2020-12-29 17543.400391
2020-12-30 17545.800781
2020-12-31 17545.800781
Name: S&P/TSX Composite index, Length: 3525, dtype: float64
ADF Statistic: -2.051734
p-value: 0.264360
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 2308.419922
2010-01-05 2308.709961
2010-01-06 2301.090088
2010-01-07 2300.050049
2010-01-08 2317.169922
...
2020-12-27 12804.730469
2020-12-28 12899.419922
2020-12-29 12850.219727
2020-12-30 12870.000000
2020-12-31 12870.000000
Name: NASDAQ Composite, Length: 3525, dtype: float64
ADF Statistic: 1.450082
p-value: 0.997330
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 5500.299805
2010-01-05 5522.500000
2010-01-06 5530.000000
2010-01-07 5526.700195
2010-01-08 5534.200195
...
2020-12-27 6502.100098
2020-12-28 6502.100098
2020-12-29 6602.700195
2020-12-30 6555.799805
2020-12-31 6555.799805
Name: FTSE 100, Length: 3525, dtype: float64
ADF Statistic: -2.726760
p-value: 0.069521
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 6048.299805
2010-01-05 6031.859863
2010-01-06 6034.330078
2010-01-07 6019.359863
2010-01-08 6037.609863
...
2020-12-27 13587.230469
2020-12-28 13790.290039
2020-12-29 13761.379883
2020-12-30 13718.780273
2020-12-31 13718.780273
Name: DAX PERFORMANCE-INDEX, Length: 3525, dtype: float64
ADF Statistic: -1.642977
p-value: 0.460706
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 4013.969971
2010-01-05 4012.909912
2010-01-06 4017.669922
2010-01-07 4024.800049
2010-01-08 4045.139893
...
2020-12-27 5522.009766
2020-12-28 5588.379883
2020-12-29 5611.790039
2020-12-30 5599.410156
2020-12-31 5599.410156
Name: CAC 40, Length: 3525, dtype: float64
ADF Statistic: -1.811155
p-value: 0.374938
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 3017.800049
2010-01-05 3012.360107
2010-01-06 3009.659912
2010-01-07 3007.340088
2010-01-08 3017.850098
...
2020-12-27 3539.260010
2020-12-28 3575.409912
2020-12-29 3581.370117
2020-12-30 3571.590088
2020-12-31 3571.590088
Name: ESTX 50 PR.EUR, Length: 3525, dtype: float64
ADF Statistic: -2.466623
p-value: 0.123808
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 2563.969971
2010-01-05 2587.770020
2010-01-06 2596.429932
2010-01-07 2590.679932
2010-01-08 2591.639893
...
2020-12-27 3659.159912
2020-12-28 3663.060059
2020-12-29 3671.110107
2020-12-30 3663.060059
2020-12-31 3663.060059
Name: BEL 20, Length: 3525, dtype: float64
ADF Statistic: -1.949033
p-value: 0.309357
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 70045.0
2010-01-05 70240.0
2010-01-06 70729.0
2010-01-07 70451.0
2010-01-08 70263.0
...
2020-12-27 117857.0
2020-12-28 119051.0
2020-12-29 119475.0
2020-12-30 119306.0
2020-12-31 119306.0
Name: IBOVESPA, Length: 3525, dtype: float64
ADF Statistic: -0.718507
p-value: 0.841897
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 32758.529297
2010-01-05 32732.759766
2010-01-06 32830.160156
2010-01-07 33064.570312
2010-01-08 32892.039062
...
2020-12-27 43372.199219
2020-12-28 43883.410156
2020-12-29 44693.988281
2020-12-30 44693.960938
2020-12-31 44693.960938
Name: IPC MEXICO, Length: 3525, dtype: float64
ADF Statistic: -2.558554
p-value: 0.101869
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 3620.699951
2010-01-05 3624.100098
2010-01-06 3639.959961
2010-01-07 3681.060059
2010-01-08 3726.500000
...
2020-12-27 5058.879883
2020-12-28 5058.879883
2020-12-29 5058.879883
2020-12-30 5058.879883
2020-12-31 5058.879883
Name: S&P/CLX IPSA, Length: 3525, dtype: float64
ADF Statistic: -1.668876
p-value: 0.447216
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
Date
2010-01-04 2384.489990
2010-01-05 2401.750000
2010-01-06 2362.459961
2010-01-07 2389.449951
2010-01-08 2352.760010
...
2020-12-27 51618.980469
2020-12-28 50483.839844
2020-12-29 51320.140625
2020-12-30 51226.488281
2020-12-31 51226.488281
Name: MERVAL, Length: 3525, dtype: float64
ADF Statistic: -0.182771
p-value: 0.940544
Critical Values:
1%: -3.432
5%: -2.862
10%: -2.567
for i in X_train:
print(X_train[i])
augmented_dickey_fuller_statistics(X_train[i])
Date
2010-01-04 732.28
2010-01-05 732.11
2010-01-06 735.73
2010-01-07 734.63
2010-01-08 738.96
...
2018-02-03 1827.35
2018-02-04 1827.35
2018-02-05 1810.32
2018-02-06 1788.43
2018-02-07 1785.44
Name: SET, Length: 2467, dtype: float64
ADF Statistic: -1.742075
p-value: 0.409575
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 517.05
2010-01-05 532.53
2010-01-06 534.46
2010-01-07 533.34
2010-01-08 520.90
...
2018-02-03 1105.04
2018-02-04 1105.04
2018-02-05 1048.71
2018-02-06 1011.60
2018-02-07 1040.55
Name: VNI, Length: 2467, dtype: float64
ADF Statistic: 1.502880
p-value: 0.997535
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 2894.550049
2010-01-05 2920.280029
2010-01-06 2930.489990
2010-01-07 2913.250000
2010-01-08 2922.760010
...
2018-02-03 3529.820068
2018-02-04 3529.820068
2018-02-05 3482.929932
2018-02-06 3406.379883
2018-02-07 3383.770020
Name: STI Index, Length: 2467, dtype: float64
ADF Statistic: -2.470955
p-value: 0.122702
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 1275.750000
2010-01-05 1288.239990
2010-01-06 1293.170044
2010-01-07 1291.420044
2010-01-08 1292.979980
...
2018-02-03 1870.479980
2018-02-04 1870.479980
2018-02-05 1853.069946
2018-02-06 1812.449951
2018-02-07 1836.680054
Name: FTSE Bursa Malaysia KLCI, Length: 2467, dtype: float64
ADF Statistic: -2.361854
p-value: 0.152793
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 2575.312988
2010-01-05 2605.175537
2010-01-06 2603.195557
2010-01-07 2586.794189
2010-01-08 2614.268311
...
2018-02-03 6628.819824
2018-02-04 6628.819824
2018-02-05 6589.674805
2018-02-06 6478.542969
2018-02-07 6534.869141
Name: Composite Index, Length: 2467, dtype: float64
ADF Statistic: -1.199667
p-value: 0.673739
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 3004.237549
2010-01-05 3027.681396
2010-01-06 3039.148438
2010-01-07 3076.988770
2010-01-08 3076.388916
...
2018-02-03 8808.485352
2018-02-04 8808.485352
2018-02-05 8613.785156
2018-02-06 8548.221680
2018-02-07 8665.331055
Name: PSEi INDEX, Length: 2467, dtype: float64
ADF Statistic: -1.494114
p-value: 0.536421
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 21823.279297
2010-01-05 22279.580078
2010-01-06 22416.669922
2010-01-07 22269.449219
2010-01-08 22296.750000
...
2018-02-03 32601.779297
2018-02-04 32601.779297
2018-02-05 32245.220703
2018-02-06 30595.419922
2018-02-07 30323.199219
Name: HANG SENG INDEX, Length: 2467, dtype: float64
ADF Statistic: -1.211371
p-value: 0.668685
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 13533.387695
2010-01-05 13517.228516
2010-01-06 13505.028320
2010-01-07 13235.332031
2010-01-08 13267.291992
...
2018-02-03 10925.117188
2018-02-04 10925.117188
2018-02-05 10836.207031
2018-02-06 10377.569336
2018-02-07 10246.929688
Name: Shenzhen Component, Length: 2467, dtype: float64
ADF Statistic: -2.756157
p-value: 0.064815
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 1696.140015
2010-01-05 1690.619995
2010-01-06 1705.319946
2010-01-07 1683.449951
2010-01-08 1695.260010
...
2018-02-03 2525.389893
2018-02-04 2525.389893
2018-02-05 2491.750000
2018-02-06 2453.310059
2018-02-07 2396.560059
Name: KOSPI Composite Index, Length: 2467, dtype: float64
ADF Statistic: -1.875817
p-value: 0.343522
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 10654.790039
2010-01-05 10681.830078
2010-01-06 10731.450195
2010-01-07 10681.660156
2010-01-08 10798.320312
...
2018-02-03 23274.529297
2018-02-04 23274.529297
2018-02-05 22682.080078
2018-02-06 21610.240234
2018-02-07 21645.369141
Name: Nikkei 225, Length: 2467, dtype: float64
ADF Statistic: -0.614099
p-value: 0.867764
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 4889.799805
2010-01-05 4939.500000
2010-01-06 4946.799805
2010-01-07 4930.500000
2010-01-08 4942.200195
...
2018-02-03 6229.799805
2018-02-04 6229.799805
2018-02-05 6128.399902
2018-02-06 5930.200195
2018-02-07 5981.500000
Name: ALL ORDINARIES, Length: 2467, dtype: float64
ADF Statistic: -1.323413
p-value: 0.618394
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 3230.149902
2010-01-05 3268.189941
2010-01-06 3271.570068
2010-01-07 3284.810059
2010-01-08 3310.229980
...
2018-02-03 8415.290039
2018-02-04 8415.290039
2018-02-05 8241.830078
2018-02-06 8241.830078
2018-02-07 8194.730469
Name: S&P/NZX 50 INDEX GROSS ( GROSS , Length: 2467, dtype: float64
ADF Statistic: 0.573161
p-value: 0.986935
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 8207.809570
2010-01-05 8211.360352
2010-01-06 8327.580078
2010-01-07 8237.379883
2010-01-08 8280.860352
...
2018-02-03 11126.230469
2018-02-04 11126.230469
2018-02-05 10946.250000
2018-02-06 10404.000000
2018-02-07 10551.540039
Name: TSEC weighted index, Length: 2467, dtype: float64
ADF Statistic: -1.352332
p-value: 0.604904
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 5232.200195
2010-01-05 5277.899902
2010-01-06 5281.799805
2010-01-07 5263.100098
2010-01-08 5244.750000
...
2018-02-03 10760.599609
2018-02-04 10760.599609
2018-02-05 10666.549805
2018-02-06 10498.250000
2018-02-07 10476.700195
Name: NIFTY 50, Length: 2467, dtype: float64
ADF Statistic: -0.247273
p-value: 0.932647
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 10583.959961
2010-01-05 10572.019531
2010-01-06 10573.679688
2010-01-07 10606.860352
2010-01-08 10618.190430
...
2018-02-03 25520.960938
2018-02-04 25520.960938
2018-02-05 24345.750000
2018-02-06 24912.769531
2018-02-07 24893.349609
Name: Dow Jones Industrial Average, Length: 2467, dtype: float64
ADF Statistic: 0.346636
p-value: 0.979386
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 7326.740234
2010-01-05 7354.870117
2010-01-06 7377.700195
2010-01-07 7393.930176
2010-01-08 7425.350098
...
2018-02-03 13085.349609
2018-02-04 13085.349609
2018-02-05 12572.929688
2018-02-06 12745.450195
2018-02-07 12687.179688
Name: NYSE COMPOSITE (DJ), Length: 2467, dtype: float64
ADF Statistic: -0.899853
p-value: 0.788021
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 640.099976
2010-01-05 638.489990
2010-01-06 637.950012
2010-01-07 641.969971
2010-01-08 644.559998
...
2018-02-03 1547.270020
2018-02-04 1547.270020
2018-02-05 1491.089966
2018-02-06 1507.170044
2018-02-07 1507.969971
Name: Russell 2000, Length: 2467, dtype: float64
ADF Statistic: -0.961591
p-value: 0.767014
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 11866.900391
2010-01-05 11888.099609
2010-01-06 11944.500000
2010-01-07 11887.500000
2010-01-08 11953.799805
...
2018-02-03 15606.000000
2018-02-04 15606.000000
2018-02-05 15334.799805
2018-02-06 15363.900391
2018-02-07 15330.599609
Name: S&P/TSX Composite index, Length: 2467, dtype: float64
ADF Statistic: -1.705631
p-value: 0.428214
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 2308.419922
2010-01-05 2308.709961
2010-01-06 2301.090088
2010-01-07 2300.050049
2010-01-08 2317.169922
...
2018-02-03 7240.950195
2018-02-04 7240.950195
2018-02-05 6967.529785
2018-02-06 7115.879883
2018-02-07 7051.979980
Name: NASDAQ Composite, Length: 2467, dtype: float64
ADF Statistic: 0.280403
p-value: 0.976427
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 5500.299805
2010-01-05 5522.500000
2010-01-06 5530.000000
2010-01-07 5526.700195
2010-01-08 5534.200195
...
2018-02-03 7443.399902
2018-02-04 7443.399902
2018-02-05 7335.000000
2018-02-06 7141.399902
2018-02-07 7279.399902
Name: FTSE 100, Length: 2467, dtype: float64
ADF Statistic: -1.852663
p-value: 0.354647
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 6048.299805
2010-01-05 6031.859863
2010-01-06 6034.330078
2010-01-07 6019.359863
2010-01-08 6037.609863
...
2018-02-03 12785.160156
2018-02-04 12785.160156
2018-02-05 12687.490234
2018-02-06 12392.660156
2018-02-07 12590.429688
Name: DAX PERFORMANCE-INDEX, Length: 2467, dtype: float64
ADF Statistic: -1.022172
p-value: 0.745092
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 4013.969971
2010-01-05 4012.909912
2010-01-06 4017.669922
2010-01-07 4024.800049
2010-01-08 4045.139893
...
2018-02-03 5364.979980
2018-02-04 5364.979980
2018-02-05 5285.830078
2018-02-06 5161.810059
2018-02-07 5255.899902
Name: CAC 40, Length: 2467, dtype: float64
ADF Statistic: -1.468372
p-value: 0.549095
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 3017.800049
2010-01-05 3012.360107
2010-01-06 3009.659912
2010-01-07 3007.340088
2010-01-08 3017.850098
...
2018-02-03 3523.280029
2018-02-04 3523.280029
2018-02-05 3478.770020
2018-02-06 3394.919922
2018-02-07 3454.520020
Name: ESTX 50 PR.EUR, Length: 2467, dtype: float64
ADF Statistic: -1.949237
p-value: 0.309265
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 2563.969971
2010-01-05 2587.770020
2010-01-06 2596.429932
2010-01-07 2590.679932
2010-01-08 2591.639893
...
2018-02-03 4053.590088
2018-02-04 4053.590088
2018-02-05 3997.590088
2018-02-06 3896.590088
2018-02-07 3991.899902
Name: BEL 20, Length: 2467, dtype: float64
ADF Statistic: -0.754382
p-value: 0.832156
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 70045.0
2010-01-05 70240.0
2010-01-06 70729.0
2010-01-07 70451.0
2010-01-08 70263.0
...
2018-02-03 84041.0
2018-02-04 84041.0
2018-02-05 81861.0
2018-02-06 83894.0
2018-02-07 82767.0
Name: IBOVESPA, Length: 2467, dtype: float64
ADF Statistic: -1.378500
p-value: 0.592539
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 32758.529297
2010-01-05 32732.759766
2010-01-06 32830.160156
2010-01-07 33064.570312
2010-01-08 32892.039062
...
2018-02-03 50395.828125
2018-02-04 50395.828125
2018-02-05 50395.828125
2018-02-06 49304.941406
2018-02-07 48976.449219
Name: IPC MEXICO, Length: 2467, dtype: float64
ADF Statistic: -1.757783
p-value: 0.401614
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 3620.699951
2010-01-05 3624.100098
2010-01-06 3639.959961
2010-01-07 3681.060059
2010-01-08 3726.500000
...
2018-02-03 5825.990234
2018-02-04 5825.990234
2018-02-05 5731.470215
2018-02-06 5697.279785
2018-02-07 5750.609863
Name: S&P/CLX IPSA, Length: 2467, dtype: float64
ADF Statistic: -0.806199
p-value: 0.817294
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-04 2384.489990
2010-01-05 2401.750000
2010-01-06 2362.459961
2010-01-07 2389.449951
2010-01-08 2352.760010
...
2018-02-03 32614.769531
2018-02-04 32614.769531
2018-02-05 31145.599609
2018-02-06 31624.179688
2018-02-07 31626.730469
Name: MERVAL, Length: 2467, dtype: float64
ADF Statistic: 2.083956
p-value: 0.998773
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
X_train.plot(legend = False)
<AxesSubplot:xlabel='Date'>
#Transformation
X_transform_data = X_train.diff().dropna()
X_transform_data.head()
X_transform_data.describe()
X_transform_data.plot(legend = False)
<AxesSubplot:xlabel='Date'>
for i in X_transform_data:
print(X_transform_data[i])
augmented_dickey_fuller_statistics(X_transform_data[i])
Date
2010-01-05 -0.17
2010-01-06 3.62
2010-01-07 -1.10
2010-01-08 4.33
2010-01-11 7.99
...
2018-02-03 0.00
2018-02-04 0.00
2018-02-05 -17.03
2018-02-06 -21.89
2018-02-07 -2.99
Name: SET, Length: 2466, dtype: float64
ADF Statistic: -48.667511
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 15.48
2010-01-06 1.93
2010-01-07 -1.12
2010-01-08 -12.44
2010-01-11 -5.84
...
2018-02-03 0.00
2018-02-04 0.00
2018-02-05 -56.33
2018-02-06 -37.11
2018-02-07 28.95
Name: VNI, Length: 2466, dtype: float64
ADF Statistic: -15.892471
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 25.729980
2010-01-06 10.209961
2010-01-07 -17.239990
2010-01-08 9.510010
2010-01-11 10.770020
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -46.890137
2018-02-06 -76.550049
2018-02-07 -22.609863
Name: STI Index, Length: 2466, dtype: float64
ADF Statistic: -17.030421
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 12.489990
2010-01-06 4.930054
2010-01-07 -1.750000
2010-01-08 1.559937
2010-01-11 1.530029
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -17.410034
2018-02-06 -40.619995
2018-02-07 24.230103
Name: FTSE Bursa Malaysia KLCI, Length: 2466, dtype: float64
ADF Statistic: -46.095534
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 29.862549
2010-01-06 -1.979980
2010-01-07 -16.401367
2010-01-08 27.474121
2010-01-11 17.833252
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -39.145020
2018-02-06 -111.131836
2018-02-07 56.326172
Name: Composite Index, Length: 2466, dtype: float64
ADF Statistic: -28.089630
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 23.443848
2010-01-06 11.467041
2010-01-07 37.840332
2010-01-08 -0.599854
2010-01-11 10.167480
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -194.700195
2018-02-06 -65.563477
2018-02-07 117.109375
Name: PSEi INDEX, Length: 2466, dtype: float64
ADF Statistic: -14.325639
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 456.300781
2010-01-06 137.089844
2010-01-07 -147.220703
2010-01-08 27.300781
2010-01-11 114.769531
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -356.558594
2018-02-06 -1649.800781
2018-02-07 -272.220703
Name: HANG SENG INDEX, Length: 2466, dtype: float64
ADF Statistic: -49.109578
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -16.159180
2010-01-06 -12.200195
2010-01-07 -269.696289
2010-01-08 31.959961
2010-01-11 -106.349609
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -88.910156
2018-02-06 -458.637695
2018-02-07 -130.639648
Name: Shenzhen Component, Length: 2466, dtype: float64
ADF Statistic: -10.979824
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -5.520020
2010-01-06 14.699951
2010-01-07 -21.869995
2010-01-08 11.810059
2010-01-11 -1.140015
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -33.639893
2018-02-06 -38.439941
2018-02-07 -56.750000
Name: KOSPI Composite Index, Length: 2466, dtype: float64
ADF Statistic: -14.015275
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 27.040039
2010-01-06 49.620117
2010-01-07 -49.790039
2010-01-08 116.660156
2010-01-11 0.000000
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -592.449219
2018-02-06 -1071.839844
2018-02-07 35.128906
Name: Nikkei 225, Length: 2466, dtype: float64
ADF Statistic: -51.500856
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 49.700195
2010-01-06 7.299805
2010-01-07 -16.299805
2010-01-08 11.700195
2010-01-11 39.000000
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -101.399902
2018-02-06 -198.199707
2018-02-07 51.299805
Name: ALL ORDINARIES, Length: 2466, dtype: float64
ADF Statistic: -23.726402
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 38.040039
2010-01-06 3.380127
2010-01-07 13.239990
2010-01-08 25.419922
2010-01-11 -6.479980
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -173.459961
2018-02-06 0.000000
2018-02-07 -47.099609
Name: S&P/NZX 50 INDEX GROSS ( GROSS , Length: 2466, dtype: float64
ADF Statistic: -47.556017
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 3.550781
2010-01-06 116.219727
2010-01-07 -90.200195
2010-01-08 43.480469
2010-01-11 42.919922
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -179.980469
2018-02-06 -542.250000
2018-02-07 147.540039
Name: TSEC weighted index, Length: 2466, dtype: float64
ADF Statistic: -12.603639
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 45.699707
2010-01-06 3.899902
2010-01-07 -18.699707
2010-01-08 -18.350098
2010-01-11 4.649902
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -94.049805
2018-02-06 -168.299805
2018-02-07 -21.549805
Name: NIFTY 50, Length: 2466, dtype: float64
ADF Statistic: -47.674469
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -11.940430
2010-01-06 1.660156
2010-01-07 33.180664
2010-01-08 11.330078
2010-01-11 45.799805
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -1175.210938
2018-02-06 567.019531
2018-02-07 -19.419922
Name: Dow Jones Industrial Average, Length: 2466, dtype: float64
ADF Statistic: -52.382595
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 28.129883
2010-01-06 22.830078
2010-01-07 16.229980
2010-01-08 31.419922
2010-01-11 23.699707
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -512.419922
2018-02-06 172.520508
2018-02-07 -58.270508
Name: NYSE COMPOSITE (DJ), Length: 2466, dtype: float64
ADF Statistic: -51.606282
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -1.609985
2010-01-06 -0.539978
2010-01-07 4.019958
2010-01-08 2.590027
2010-01-11 -0.570007
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -56.180054
2018-02-06 16.080078
2018-02-07 0.799927
Name: Russell 2000, Length: 2466, dtype: float64
ADF Statistic: -35.055026
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 21.199219
2010-01-06 56.400391
2010-01-07 -57.000000
2010-01-08 66.299805
2010-01-11 -6.700195
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -271.200195
2018-02-06 29.100586
2018-02-07 -33.300781
Name: S&P/TSX Composite index, Length: 2466, dtype: float64
ADF Statistic: -17.617490
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 0.290039
2010-01-06 -7.619873
2010-01-07 -1.040039
2010-01-08 17.119873
2010-01-11 -4.760010
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -273.420410
2018-02-06 148.350098
2018-02-07 -63.899902
Name: NASDAQ Composite, Length: 2466, dtype: float64
ADF Statistic: -51.960518
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 22.200195
2010-01-06 7.500000
2010-01-07 -3.299805
2010-01-08 7.500000
2010-01-11 3.899902
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -108.399902
2018-02-06 -193.600098
2018-02-07 138.000000
Name: FTSE 100, Length: 2466, dtype: float64
ADF Statistic: -26.238078
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -16.439941
2010-01-06 2.470215
2010-01-07 -14.970215
2010-01-08 18.250000
2010-01-11 2.890137
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -97.669922
2018-02-06 -294.830078
2018-02-07 197.769531
Name: DAX PERFORMANCE-INDEX, Length: 2466, dtype: float64
ADF Statistic: -49.606910
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -1.060059
2010-01-06 4.760010
2010-01-07 7.130127
2010-01-08 20.339844
2010-01-11 -2.049805
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -79.149902
2018-02-06 -124.020020
2018-02-07 94.089844
Name: CAC 40, Length: 2466, dtype: float64
ADF Statistic: -26.570158
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -5.439941
2010-01-06 -2.700195
2010-01-07 -2.319824
2010-01-08 10.510010
2010-01-11 -7.610107
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -44.510010
2018-02-06 -83.850098
2018-02-07 59.600098
Name: ESTX 50 PR.EUR, Length: 2466, dtype: float64
ADF Statistic: -26.346978
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 23.800049
2010-01-06 8.659912
2010-01-07 -5.750000
2010-01-08 0.959961
2010-01-11 -5.779785
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -56.000000
2018-02-06 -101.000000
2018-02-07 95.309814
Name: BEL 20, Length: 2466, dtype: float64
ADF Statistic: -26.747530
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 195.0
2010-01-06 489.0
2010-01-07 -278.0
2010-01-08 -188.0
2010-01-11 170.0
...
2018-02-03 0.0
2018-02-04 0.0
2018-02-05 -2180.0
2018-02-06 2033.0
2018-02-07 -1127.0
Name: IBOVESPA, Length: 2466, dtype: float64
ADF Statistic: -50.627096
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 -25.769531
2010-01-06 97.400391
2010-01-07 234.410156
2010-01-08 -172.531250
2010-01-11 43.339844
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 0.000000
2018-02-06 -1090.886719
2018-02-07 -328.492188
Name: IPC MEXICO, Length: 2466, dtype: float64
ADF Statistic: -19.639372
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 3.400146
2010-01-06 15.859863
2010-01-07 41.100098
2010-01-08 45.439941
2010-01-11 17.669922
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -94.520020
2018-02-06 -34.190430
2018-02-07 53.330078
Name: S&P/CLX IPSA, Length: 2466, dtype: float64
ADF Statistic: -9.775807
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
Date
2010-01-05 17.260010
2010-01-06 -39.290039
2010-01-07 26.989990
2010-01-08 -36.689941
2010-01-11 -35.020020
...
2018-02-03 0.000000
2018-02-04 0.000000
2018-02-05 -1469.169922
2018-02-06 478.580078
2018-02-07 2.550781
Name: MERVAL, Length: 2466, dtype: float64
ADF Statistic: -21.452364
p-value: 0.000000
Critical Values:
1%: -3.433
5%: -2.863
10%: -2.567
#Granger's Causality Test
from statsmodels.tsa.stattools import grangercausalitytests
maxlag=12
test = 'ssr-chi2test'
def grangers_causality_matrix(data, variables, test = 'ssr_chi2test', verbose=False):
dataset = pd.DataFrame(np.zeros((len(variables), len(variables))), columns=variables, index=variables)
for c in dataset.columns:
for r in dataset.index:
test_result = grangercausalitytests(data[[r,c]], maxlag=maxlag, verbose=False)
p_values = [round(test_result[i+1][0][test][1],4) for i in range(maxlag)]
if verbose: print(f'Y = {r}, X = {c}, P Values = {p_values}')
min_p_value = np.min(p_values)
dataset.loc[r,c] = min_p_value
dataset.columns = [var + '_x' for var in variables]
dataset.index = [var + '_y' for var in variables]
return dataset
grangers_causality_matrix(X_transform_data, variables = X_transform_data.columns)
| SET_x | VNI_x | STI Index_x | FTSE Bursa Malaysia KLCI_x | Composite Index_x | PSEi INDEX_x | HANG SENG INDEX_x | Shenzhen Component_x | KOSPI Composite Index_x | Nikkei 225_x | ALL ORDINARIES_x | S&P/NZX 50 INDEX GROSS ( GROSS _x | TSEC weighted index_x | NIFTY 50_x | Dow Jones Industrial Average_x | NYSE COMPOSITE (DJ)_x | Russell 2000_x | S&P/TSX Composite index_x | NASDAQ Composite_x | FTSE 100_x | DAX PERFORMANCE-INDEX_x | CAC 40_x | ESTX 50 PR.EUR_x | BEL 20_x | IBOVESPA_x | IPC MEXICO_x | S&P/CLX IPSA_x | MERVAL_x | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SET_y | 1.0000 | 0.0672 | 0.0430 | 0.2607 | 0.0000 | 0.1740 | 0.0445 | 0.0132 | 0.0512 | 0.0095 | 0.1254 | 0.6449 | 0.0707 | 0.0009 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| VNI_y | 0.0150 | 1.0000 | 0.0000 | 0.0058 | 0.0032 | 0.0077 | 0.0100 | 0.2470 | 0.0013 | 0.0406 | 0.0670 | 0.2193 | 0.0047 | 0.0005 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0001 | 0.0000 |
| STI Index_y | 0.0083 | 0.7242 | 1.0000 | 0.0089 | 0.0468 | 0.0499 | 0.0140 | 0.0051 | 0.0023 | 0.5758 | 0.0398 | 0.0958 | 0.0057 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| FTSE Bursa Malaysia KLCI_y | 0.0000 | 0.3190 | 0.0000 | 1.0000 | 0.0003 | 0.1457 | 0.0215 | 0.1946 | 0.0000 | 0.1822 | 0.0128 | 0.2640 | 0.0058 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| Composite Index_y | 0.0034 | 0.0686 | 0.0557 | 0.0845 | 1.0000 | 0.1558 | 0.0891 | 0.0077 | 0.2777 | 0.0006 | 0.0314 | 0.0664 | 0.1998 | 0.0002 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| PSEi INDEX_y | 0.0000 | 0.1911 | 0.0000 | 0.0040 | 0.0000 | 1.0000 | 0.0000 | 0.2415 | 0.0000 | 0.0162 | 0.0001 | 0.4321 | 0.0002 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| HANG SENG INDEX_y | 0.0005 | 0.0048 | 0.0000 | 0.0089 | 0.1393 | 0.0892 | 1.0000 | 0.0017 | 0.2127 | 0.5333 | 0.0287 | 0.0836 | 0.0527 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| Shenzhen Component_y | 0.3770 | 0.0845 | 0.0451 | 0.0101 | 0.5663 | 0.1119 | 0.3367 | 1.0000 | 0.3185 | 0.2036 | 0.6065 | 0.4735 | 0.2691 | 0.1051 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0003 | 0.0000 | 0.2372 |
| KOSPI Composite Index_y | 0.0000 | 0.0245 | 0.0000 | 0.0349 | 0.0000 | 0.4697 | 0.0000 | 0.0557 | 1.0000 | 0.3504 | 0.0003 | 0.0651 | 0.0036 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| Nikkei 225_y | 0.0000 | 0.0024 | 0.0000 | 0.0627 | 0.0088 | 0.2989 | 0.0002 | 0.0025 | 0.0182 | 1.0000 | 0.0000 | 0.0333 | 0.0046 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| ALL ORDINARIES_y | 0.0000 | 0.1972 | 0.0000 | 0.2493 | 0.0154 | 0.2303 | 0.0211 | 0.1591 | 0.2319 | 0.2518 | 1.0000 | 0.2524 | 0.3847 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| S&P/NZX 50 INDEX GROSS ( GROSS _y | 0.0001 | 0.0463 | 0.0000 | 0.0308 | 0.0048 | 0.0118 | 0.0000 | 0.0118 | 0.0006 | 0.0100 | 0.0000 | 1.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| TSEC weighted index_y | 0.0000 | 0.0364 | 0.0000 | 0.1194 | 0.0024 | 0.0785 | 0.0000 | 0.0275 | 0.0077 | 0.2790 | 0.0024 | 0.1507 | 1.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| NIFTY 50_y | 0.0438 | 0.0283 | 0.0718 | 0.0965 | 0.0021 | 0.3197 | 0.0563 | 0.0413 | 0.0153 | 0.8833 | 0.2450 | 0.2397 | 0.0151 | 1.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| Dow Jones Industrial Average_y | 0.7099 | 0.3629 | 0.0966 | 0.1356 | 0.0205 | 0.2353 | 0.0302 | 0.0441 | 0.0912 | 0.2334 | 0.0204 | 0.1221 | 0.0478 | 0.6449 | 1.0000 | 0.0083 | 0.0479 | 0.0507 | 0.3534 | 0.0306 | 0.0212 | 0.0377 | 0.0598 | 0.0274 | 0.2573 | 0.2242 | 0.1664 | 0.0885 |
| NYSE COMPOSITE (DJ)_y | 0.2718 | 0.4656 | 0.0222 | 0.2359 | 0.0017 | 0.1816 | 0.1090 | 0.0181 | 0.1339 | 0.3643 | 0.0888 | 0.2475 | 0.0721 | 0.2786 | 0.0538 | 1.0000 | 0.4764 | 0.1077 | 0.6105 | 0.0126 | 0.0238 | 0.0170 | 0.0240 | 0.0214 | 0.1427 | 0.2479 | 0.3839 | 0.2837 |
| Russell 2000_y | 0.2754 | 0.2855 | 0.4902 | 0.2275 | 0.0505 | 0.3426 | 0.0787 | 0.1583 | 0.3041 | 0.1600 | 0.0585 | 0.1610 | 0.0193 | 0.4117 | 0.1958 | 0.4076 | 1.0000 | 0.1069 | 0.4221 | 0.0515 | 0.0434 | 0.0372 | 0.0814 | 0.0540 | 0.1217 | 0.2478 | 0.1825 | 0.2838 |
| S&P/TSX Composite index_y | 0.0298 | 0.4433 | 0.0038 | 0.1030 | 0.0046 | 0.1420 | 0.0142 | 0.0910 | 0.0427 | 0.0974 | 0.1666 | 0.0630 | 0.0225 | 0.2830 | 0.0568 | 0.0245 | 0.2189 | 1.0000 | 0.0110 | 0.0841 | 0.0947 | 0.0439 | 0.1197 | 0.0821 | 0.2372 | 0.0380 | 0.1278 | 0.2968 |
| NASDAQ Composite_y | 0.8093 | 0.3432 | 0.1409 | 0.6317 | 0.0726 | 0.4721 | 0.0951 | 0.0810 | 0.1083 | 0.0180 | 0.0486 | 0.0688 | 0.0046 | 0.5478 | 0.4203 | 0.4600 | 0.1937 | 0.0558 | 1.0000 | 0.0114 | 0.0139 | 0.0064 | 0.0269 | 0.0083 | 0.2689 | 0.0684 | 0.4514 | 0.2632 |
| FTSE 100_y | 0.0225 | 0.6346 | 0.0136 | 0.0630 | 0.0942 | 0.1041 | 0.0578 | 0.0434 | 0.1325 | 0.0606 | 0.1749 | 0.0119 | 0.0093 | 0.2118 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 1.0000 | 0.5341 | 0.6187 | 0.4155 | 0.3573 | 0.0000 | 0.0000 | 0.0003 | 0.0003 |
| DAX PERFORMANCE-INDEX_y | 0.2974 | 0.4331 | 0.1603 | 0.3208 | 0.1802 | 0.2472 | 0.0220 | 0.0447 | 0.1132 | 0.3863 | 0.1478 | 0.0518 | 0.0124 | 0.3331 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.2410 | 1.0000 | 0.4126 | 0.4412 | 0.1430 | 0.0000 | 0.0005 | 0.0232 | 0.0071 |
| CAC 40_y | 0.0670 | 0.5370 | 0.0739 | 0.2174 | 0.1999 | 0.2700 | 0.1277 | 0.0545 | 0.2186 | 0.3301 | 0.0536 | 0.0115 | 0.0032 | 0.1627 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.1402 | 0.3786 | 1.0000 | 0.5926 | 0.1567 | 0.0000 | 0.0000 | 0.0196 | 0.0142 |
| ESTX 50 PR.EUR_y | 0.1522 | 0.4569 | 0.1586 | 0.1414 | 0.1961 | 0.1665 | 0.1517 | 0.0213 | 0.3981 | 0.3872 | 0.0757 | 0.0143 | 0.0029 | 0.2805 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.1036 | 0.0600 | 0.0005 | 1.0000 | 0.1153 | 0.0000 | 0.0000 | 0.0189 | 0.0312 |
| BEL 20_y | 0.0163 | 0.5246 | 0.0272 | 0.0696 | 0.1710 | 0.2446 | 0.0316 | 0.0162 | 0.0134 | 0.1413 | 0.0695 | 0.0122 | 0.0025 | 0.0739 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.5759 | 0.5418 | 0.1336 | 0.4203 | 1.0000 | 0.0000 | 0.0000 | 0.0173 | 0.0147 |
| IBOVESPA_y | 0.0434 | 0.2171 | 0.2019 | 0.3376 | 0.0209 | 0.0319 | 0.2041 | 0.4011 | 0.3098 | 0.5562 | 0.0467 | 0.0452 | 0.0129 | 0.0044 | 0.2151 | 0.1140 | 0.0775 | 0.0002 | 0.0565 | 0.0465 | 0.0222 | 0.0264 | 0.0506 | 0.0977 | 1.0000 | 0.0179 | 0.0994 | 0.1666 |
| IPC MEXICO_y | 0.4749 | 0.1628 | 0.0798 | 0.3071 | 0.0133 | 0.1117 | 0.1065 | 0.1641 | 0.0574 | 0.1419 | 0.5561 | 0.0537 | 0.0612 | 0.2534 | 0.4378 | 0.1386 | 0.4070 | 0.0299 | 0.2125 | 0.4098 | 0.4190 | 0.4682 | 0.6096 | 0.3296 | 0.1406 | 1.0000 | 0.2260 | 0.0071 |
| S&P/CLX IPSA_y | 0.5098 | 0.1061 | 0.0470 | 0.1023 | 0.0002 | 0.0016 | 0.3405 | 0.0033 | 0.1388 | 0.0155 | 0.1418 | 0.3312 | 0.2693 | 0.2872 | 0.0003 | 0.0000 | 0.0003 | 0.0000 | 0.0002 | 0.3798 | 0.2691 | 0.5367 | 0.2183 | 0.5370 | 0.0000 | 0.0003 | 1.0000 | 0.0003 |
| MERVAL_y | 0.3500 | 0.3700 | 0.6097 | 0.4966 | 0.7941 | 0.1886 | 0.1506 | 0.5356 | 0.4301 | 0.2797 | 0.2482 | 0.2658 | 0.1463 | 0.6070 | 0.1503 | 0.1866 | 0.0887 | 0.3627 | 0.0227 | 0.3413 | 0.1086 | 0.5556 | 0.4324 | 0.4359 | 0.4912 | 0.1706 | 0.5080 | 1.0000 |
#VAR MODEL (Run All Markets)
import numpy as np
import pandas as pd
import statsmodels.api as sm
from statsmodels.tsa.api import VAR
#Lag Order Selection
model_world = VAR(endog = X_transform_data)
res_world = model_world.select_order(30)
print(res_world.summary())
#Model
mod_world = VAR(X_transform_data)
res_world = mod_world.fit(maxlags=30, ic='aic')
print(res_world.summary())
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
VAR Order Selection (* highlights the minimums)
==================================================
AIC BIC FPE HQIC
--------------------------------------------------
0 198.7 198.8* 2.034e+86 198.8
1 198.0* 200.0 1.007e+86* 198.7*
2 198.2 202.0 1.236e+86 199.6
3 198.4 204.1 1.526e+86 200.5
4 198.7 206.3 2.031e+86 201.5
5 199.0 208.4 2.637e+86 202.4
6 199.2 210.5 3.372e+86 203.3
7 199.4 212.5 3.964e+86 204.2
8 199.6 214.6 5.025e+86 205.1
9 199.9 216.8 6.746e+86 206.0
10 200.2 218.9 9.039e+86 207.0
11 200.5 221.1 1.239e+87 208.0
12 200.7 223.2 1.563e+87 208.9
13 200.9 225.3 1.962e+87 209.8
14 201.1 227.3 2.460e+87 210.7
15 201.4 229.4 3.132e+87 211.6
16 201.6 231.6 4.167e+87 212.5
17 201.9 233.7 5.424e+87 213.4
18 202.1 235.7 6.910e+87 214.3
19 202.3 237.8 8.795e+87 215.2
20 202.5 239.9 1.134e+88 216.1
21 202.7 241.9 1.382e+88 216.9
22 202.8 244.0 1.709e+88 217.8
23 203.1 246.0 2.208e+88 218.7
24 203.3 248.1 2.875e+88 219.6
25 203.5 250.2 3.936e+88 220.5
26 203.8 252.3 5.252e+88 221.4
27 203.9 254.3 6.394e+88 222.2
28 204.0 256.3 7.552e+88 223.0
29 204.2 258.3 9.655e+88 223.8
30 204.3 260.3 1.213e+89 224.7
--------------------------------------------------
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
Summary of Regression Results
==================================
Model: VAR
Method: OLS
Date: Thu, 06, May, 2021
Time: 18:30:09
--------------------------------------------------------------------
No. of Equations: 28.0000 BIC: 199.932
Nobs: 2465.00 HQIC: 198.713
Log likelihood: -341180. FPE: 9.95794e+85
AIC: 198.018 Det(Omega_mle): 7.17700e+85
--------------------------------------------------------------------
Results for equation SET
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.325084 0.216819 1.499 0.134
L1.SET -0.026980 0.023609 -1.143 0.253
L1.VNI 0.089497 0.040882 2.189 0.029
L1.STI Index -0.008957 0.015349 -0.584 0.560
L1.FTSE Bursa Malaysia KLCI -0.028740 0.033721 -0.852 0.394
L1.Composite Index 0.020161 0.006922 2.912 0.004
L1.PSEi INDEX -0.001030 0.004571 -0.225 0.822
L1.HANG SENG INDEX -0.000985 0.001554 -0.634 0.526
L1.Shenzhen Component -0.004608 0.001468 -3.139 0.002
L1.KOSPI Composite Index 0.017376 0.019116 0.909 0.363
L1.Nikkei 225 -0.004267 0.001534 -2.781 0.005
L1.ALL ORDINARIES -0.001052 0.007977 -0.132 0.895
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.004607 0.009530 0.483 0.629
L1.TSEC weighted index -0.006149 0.004533 -1.357 0.175
L1.NIFTY 50 0.001287 0.004510 0.285 0.775
L1.Dow Jones Industrial Average -0.008481 0.006360 -1.334 0.182
L1.NYSE COMPOSITE (DJ) 0.042808 0.013060 3.278 0.001
L1.Russell 2000 -0.101860 0.052780 -1.930 0.054
L1.S&P/TSX Composite index 0.008952 0.003985 2.247 0.025
L1.NASDAQ Composite 0.015491 0.015221 1.018 0.309
L1.FTSE 100 0.004738 0.008523 0.556 0.578
L1.DAX PERFORMANCE-INDEX 0.000596 0.006184 0.096 0.923
L1.CAC 40 0.018712 0.020266 0.923 0.356
L1.ESTX 50 PR.EUR -0.034103 0.026029 -1.310 0.190
L1.BEL 20 -0.031976 0.020137 -1.588 0.112
L1.IBOVESPA 0.001065 0.000396 2.689 0.007
L1.IPC MEXICO -0.000411 0.000910 -0.452 0.651
L1.S&P/CLX IPSA 0.023625 0.008091 2.920 0.004
L1.MERVAL 0.001136 0.001325 0.858 0.391
=====================================================================================================
Results for equation VNI
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.142126 0.108811 1.306 0.191
L1.SET 0.002813 0.011848 0.237 0.812
L1.VNI 0.051493 0.020517 2.510 0.012
L1.STI Index 0.015226 0.007703 1.977 0.048
L1.FTSE Bursa Malaysia KLCI 0.019744 0.016923 1.167 0.243
L1.Composite Index -0.005391 0.003474 -1.552 0.121
L1.PSEi INDEX 0.004779 0.002294 2.083 0.037
L1.HANG SENG INDEX -0.000941 0.000780 -1.207 0.228
L1.Shenzhen Component -0.000002 0.000737 -0.002 0.998
L1.KOSPI Composite Index 0.010798 0.009593 1.126 0.260
L1.Nikkei 225 -0.000265 0.000770 -0.344 0.731
L1.ALL ORDINARIES -0.003253 0.004003 -0.812 0.417
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.000076 0.004783 -0.016 0.987
L1.TSEC weighted index 0.000230 0.002275 0.101 0.919
L1.NIFTY 50 -0.000738 0.002263 -0.326 0.744
L1.Dow Jones Industrial Average 0.003906 0.003192 1.224 0.221
L1.NYSE COMPOSITE (DJ) 0.003113 0.006554 0.475 0.635
L1.Russell 2000 0.014048 0.026488 0.530 0.596
L1.S&P/TSX Composite index -0.002022 0.002000 -1.011 0.312
L1.NASDAQ Composite 0.008807 0.007639 1.153 0.249
L1.FTSE 100 -0.003930 0.004277 -0.919 0.358
L1.DAX PERFORMANCE-INDEX -0.007127 0.003104 -2.296 0.022
L1.CAC 40 0.004498 0.010170 0.442 0.658
L1.ESTX 50 PR.EUR 0.014999 0.013063 1.148 0.251
L1.BEL 20 0.003597 0.010106 0.356 0.722
L1.IBOVESPA 0.000287 0.000199 1.446 0.148
L1.IPC MEXICO -0.000545 0.000457 -1.193 0.233
L1.S&P/CLX IPSA -0.002997 0.004061 -0.738 0.460
L1.MERVAL 0.001455 0.000665 2.188 0.029
=====================================================================================================
Results for equation STI Index
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const -0.131943 0.398885 -0.331 0.741
L1.SET 0.024455 0.043435 0.563 0.573
L1.VNI 0.013531 0.075212 0.180 0.857
L1.STI Index -0.076860 0.028238 -2.722 0.006
L1.FTSE Bursa Malaysia KLCI -0.121521 0.062036 -1.959 0.050
L1.Composite Index 0.004704 0.012735 0.369 0.712
L1.PSEi INDEX 0.005930 0.008410 0.705 0.481
L1.HANG SENG INDEX 0.003513 0.002859 1.229 0.219
L1.Shenzhen Component -0.011033 0.002700 -4.086 0.000
L1.KOSPI Composite Index 0.017636 0.035168 0.501 0.616
L1.Nikkei 225 -0.003232 0.002823 -1.145 0.252
L1.ALL ORDINARIES -0.014528 0.014676 -0.990 0.322
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.041522 0.017532 2.368 0.018
L1.TSEC weighted index -0.010129 0.008340 -1.215 0.225
L1.NIFTY 50 -0.003364 0.008297 -0.405 0.685
L1.Dow Jones Industrial Average -0.010320 0.011701 -0.882 0.378
L1.NYSE COMPOSITE (DJ) 0.089689 0.024027 3.733 0.000
L1.Russell 2000 -0.053060 0.097100 -0.546 0.585
L1.S&P/TSX Composite index 0.003035 0.007330 0.414 0.679
L1.NASDAQ Composite 0.025262 0.028002 0.902 0.367
L1.FTSE 100 0.042784 0.015680 2.729 0.006
L1.DAX PERFORMANCE-INDEX 0.013405 0.011378 1.178 0.239
L1.CAC 40 0.040748 0.037283 1.093 0.274
L1.ESTX 50 PR.EUR -0.075668 0.047886 -1.580 0.114
L1.BEL 20 -0.088758 0.037047 -2.396 0.017
L1.IBOVESPA 0.002131 0.000728 2.926 0.003
L1.IPC MEXICO 0.002068 0.001675 1.235 0.217
L1.S&P/CLX IPSA 0.027099 0.014886 1.820 0.069
L1.MERVAL 0.000463 0.002438 0.190 0.849
=====================================================================================================
Results for equation FTSE Bursa Malaysia KLCI
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.109453 0.153229 0.714 0.475
L1.SET 0.012108 0.016685 0.726 0.468
L1.VNI -0.012015 0.028892 -0.416 0.678
L1.STI Index -0.003672 0.010848 -0.339 0.735
L1.FTSE Bursa Malaysia KLCI 0.007288 0.023831 0.306 0.760
L1.Composite Index 0.005583 0.004892 1.141 0.254
L1.PSEi INDEX -0.000793 0.003231 -0.245 0.806
L1.HANG SENG INDEX -0.001523 0.001098 -1.387 0.166
L1.Shenzhen Component -0.003009 0.001037 -2.901 0.004
L1.KOSPI Composite Index 0.037472 0.013510 2.774 0.006
L1.Nikkei 225 -0.003367 0.001084 -3.105 0.002
L1.ALL ORDINARIES -0.003273 0.005638 -0.581 0.562
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.007523 0.006735 1.117 0.264
L1.TSEC weighted index -0.002502 0.003204 -0.781 0.435
L1.NIFTY 50 -0.001584 0.003187 -0.497 0.619
L1.Dow Jones Industrial Average 0.009854 0.004495 2.192 0.028
L1.NYSE COMPOSITE (DJ) 0.003195 0.009230 0.346 0.729
L1.Russell 2000 -0.002795 0.037300 -0.075 0.940
L1.S&P/TSX Composite index 0.009914 0.002816 3.521 0.000
L1.NASDAQ Composite -0.006060 0.010757 -0.563 0.573
L1.FTSE 100 0.007854 0.006023 1.304 0.192
L1.DAX PERFORMANCE-INDEX -0.003550 0.004371 -0.812 0.417
L1.CAC 40 0.023041 0.014322 1.609 0.108
L1.ESTX 50 PR.EUR -0.024983 0.018395 -1.358 0.174
L1.BEL 20 -0.004974 0.014231 -0.350 0.727
L1.IBOVESPA 0.000926 0.000280 3.309 0.001
L1.IPC MEXICO 0.002509 0.000643 3.900 0.000
L1.S&P/CLX IPSA 0.009682 0.005718 1.693 0.090
L1.MERVAL 0.000255 0.000936 0.272 0.785
=====================================================================================================
Results for equation Composite Index
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.249605 0.773595 1.615 0.106
L1.SET 0.078558 0.084237 0.933 0.351
L1.VNI -0.228949 0.145865 -1.570 0.117
L1.STI Index -0.035565 0.054765 -0.649 0.516
L1.FTSE Bursa Malaysia KLCI -0.181581 0.120313 -1.509 0.131
L1.Composite Index 0.017567 0.024698 0.711 0.477
L1.PSEi INDEX -0.007757 0.016310 -0.476 0.634
L1.HANG SENG INDEX -0.010512 0.005546 -1.896 0.058
L1.Shenzhen Component -0.011975 0.005237 -2.287 0.022
L1.KOSPI Composite Index 0.075166 0.068204 1.102 0.270
L1.Nikkei 225 -0.020293 0.005474 -3.707 0.000
L1.ALL ORDINARIES -0.002228 0.028462 -0.078 0.938
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.026759 0.034002 0.787 0.431
L1.TSEC weighted index -0.006239 0.016174 -0.386 0.700
L1.NIFTY 50 0.009467 0.016091 0.588 0.556
L1.Dow Jones Industrial Average -0.025907 0.022693 -1.142 0.254
L1.NYSE COMPOSITE (DJ) 0.203460 0.046598 4.366 0.000
L1.Russell 2000 -0.619563 0.188315 -3.290 0.001
L1.S&P/TSX Composite index 0.039629 0.014217 2.788 0.005
L1.NASDAQ Composite 0.064047 0.054307 1.179 0.238
L1.FTSE 100 0.009923 0.030409 0.326 0.744
L1.DAX PERFORMANCE-INDEX 0.040788 0.022066 1.848 0.065
L1.CAC 40 0.076072 0.072307 1.052 0.293
L1.ESTX 50 PR.EUR -0.208160 0.092870 -2.241 0.025
L1.BEL 20 -0.099593 0.071849 -1.386 0.166
L1.IBOVESPA 0.002195 0.001412 1.554 0.120
L1.IPC MEXICO 0.009264 0.003248 2.852 0.004
L1.S&P/CLX IPSA 0.059957 0.028869 2.077 0.038
L1.MERVAL -0.002676 0.004728 -0.566 0.571
=====================================================================================================
Results for equation PSEi INDEX
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.660277 1.074354 1.545 0.122
L1.SET 0.401702 0.116987 3.434 0.001
L1.VNI -0.176013 0.202574 -0.869 0.385
L1.STI Index 0.145375 0.076057 1.911 0.056
L1.FTSE Bursa Malaysia KLCI -0.218150 0.167088 -1.306 0.192
L1.Composite Index 0.063653 0.034300 1.856 0.063
L1.PSEi INDEX -0.013725 0.022651 -0.606 0.545
L1.HANG SENG INDEX -0.007082 0.007702 -0.920 0.358
L1.Shenzhen Component -0.016692 0.007273 -2.295 0.022
L1.KOSPI Composite Index 0.137525 0.094721 1.452 0.147
L1.Nikkei 225 -0.034140 0.007602 -4.491 0.000
L1.ALL ORDINARIES 0.025065 0.039527 0.634 0.526
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.078448 0.047222 -1.661 0.097
L1.TSEC weighted index -0.018725 0.022462 -0.834 0.404
L1.NIFTY 50 0.029547 0.022347 1.322 0.186
L1.Dow Jones Industrial Average -0.035347 0.031515 -1.122 0.262
L1.NYSE COMPOSITE (DJ) 0.174618 0.064714 2.698 0.007
L1.Russell 2000 -0.231102 0.261529 -0.884 0.377
L1.S&P/TSX Composite index -0.001689 0.019744 -0.086 0.932
L1.NASDAQ Composite 0.132043 0.075421 1.751 0.080
L1.FTSE 100 -0.014472 0.042232 -0.343 0.732
L1.DAX PERFORMANCE-INDEX -0.005351 0.030644 -0.175 0.861
L1.CAC 40 -0.033335 0.100418 -0.332 0.740
L1.ESTX 50 PR.EUR -0.023615 0.128976 -0.183 0.855
L1.BEL 20 0.188534 0.099782 1.889 0.059
L1.IBOVESPA 0.003279 0.001962 1.672 0.095
L1.IPC MEXICO 0.014769 0.004511 3.274 0.001
L1.S&P/CLX IPSA 0.070722 0.040093 1.764 0.078
L1.MERVAL 0.005433 0.006566 0.827 0.408
=====================================================================================================
Results for equation HANG SENG INDEX
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.559220 4.143675 0.135 0.893
L1.SET 0.280210 0.451206 0.621 0.535
L1.VNI 2.287671 0.781308 2.928 0.003
L1.STI Index 0.123331 0.293343 0.420 0.674
L1.FTSE Bursa Malaysia KLCI -1.008531 0.644442 -1.565 0.118
L1.Composite Index -0.151734 0.132294 -1.147 0.251
L1.PSEi INDEX 0.071815 0.087362 0.822 0.411
L1.HANG SENG INDEX -0.082604 0.029704 -2.781 0.005
L1.Shenzhen Component -0.076675 0.028051 -2.733 0.006
L1.KOSPI Composite Index -0.040954 0.365328 -0.112 0.911
L1.Nikkei 225 -0.030098 0.029321 -1.026 0.305
L1.ALL ORDINARIES -0.074123 0.152452 -0.486 0.627
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.133017 0.182129 0.730 0.465
L1.TSEC weighted index -0.161226 0.086634 -1.861 0.063
L1.NIFTY 50 0.035808 0.086188 0.415 0.678
L1.Dow Jones Industrial Average -0.232424 0.121551 -1.912 0.056
L1.NYSE COMPOSITE (DJ) 1.030503 0.249595 4.129 0.000
L1.Russell 2000 -0.771660 1.008689 -0.765 0.444
L1.S&P/TSX Composite index 0.108910 0.076149 1.430 0.153
L1.NASDAQ Composite 0.541453 0.290890 1.861 0.063
L1.FTSE 100 0.387917 0.162884 2.382 0.017
L1.DAX PERFORMANCE-INDEX 0.106705 0.118192 0.903 0.367
L1.CAC 40 0.459679 0.387302 1.187 0.235
L1.ESTX 50 PR.EUR -0.921905 0.497449 -1.853 0.064
L1.BEL 20 -0.337220 0.384850 -0.876 0.381
L1.IBOVESPA 0.035008 0.007566 4.627 0.000
L1.IPC MEXICO 0.000150 0.017398 0.009 0.993
L1.S&P/CLX IPSA 0.448673 0.154633 2.902 0.004
L1.MERVAL -0.024012 0.025325 -0.948 0.343
=====================================================================================================
Results for equation Shenzhen Component
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const -1.634163 3.323838 -0.492 0.623
L1.SET -0.219436 0.361933 -0.606 0.544
L1.VNI 1.002901 0.626724 1.600 0.110
L1.STI Index 0.233650 0.235305 0.993 0.321
L1.FTSE Bursa Malaysia KLCI 0.455914 0.516937 0.882 0.378
L1.Composite Index -0.110054 0.106119 -1.037 0.300
L1.PSEi INDEX 0.068668 0.070077 0.980 0.327
L1.HANG SENG INDEX 0.001459 0.023827 0.061 0.951
L1.Shenzhen Component 0.009172 0.022501 0.408 0.684
L1.KOSPI Composite Index -0.006486 0.293047 -0.022 0.982
L1.Nikkei 225 0.030592 0.023520 1.301 0.193
L1.ALL ORDINARIES -0.260920 0.122289 -2.134 0.033
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.064392 0.146094 -0.441 0.659
L1.TSEC weighted index -0.103204 0.069493 -1.485 0.138
L1.NIFTY 50 -0.071755 0.069136 -1.038 0.299
L1.Dow Jones Industrial Average -0.059490 0.097502 -0.610 0.542
L1.NYSE COMPOSITE (DJ) 0.237243 0.200212 1.185 0.236
L1.Russell 2000 0.045571 0.809117 0.056 0.955
L1.S&P/TSX Composite index 0.065557 0.061083 1.073 0.283
L1.NASDAQ Composite 0.100202 0.233337 0.429 0.668
L1.FTSE 100 -0.062794 0.130657 -0.481 0.631
L1.DAX PERFORMANCE-INDEX 0.046112 0.094807 0.486 0.627
L1.CAC 40 0.036977 0.310673 0.119 0.905
L1.ESTX 50 PR.EUR -0.327062 0.399027 -0.820 0.412
L1.BEL 20 0.466947 0.308707 1.513 0.130
L1.IBOVESPA 0.010998 0.006069 1.812 0.070
L1.IPC MEXICO -0.017563 0.013956 -1.258 0.208
L1.S&P/CLX IPSA 0.229782 0.124039 1.852 0.064
L1.MERVAL -0.040714 0.020314 -2.004 0.045
=====================================================================================================
Results for equation KOSPI Composite Index
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.118762 0.302505 0.393 0.695
L1.SET 0.042428 0.032940 1.288 0.198
L1.VNI 0.105486 0.057039 1.849 0.064
L1.STI Index -0.019530 0.021415 -0.912 0.362
L1.FTSE Bursa Malaysia KLCI -0.106694 0.047047 -2.268 0.023
L1.Composite Index 0.002579 0.009658 0.267 0.789
L1.PSEi INDEX -0.000450 0.006378 -0.071 0.944
L1.HANG SENG INDEX 0.002809 0.002169 1.295 0.195
L1.Shenzhen Component -0.008960 0.002048 -4.376 0.000
L1.KOSPI Composite Index -0.108534 0.026670 -4.069 0.000
L1.Nikkei 225 -0.006250 0.002141 -2.920 0.004
L1.ALL ORDINARIES -0.001370 0.011130 -0.123 0.902
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.022023 0.013296 1.656 0.098
L1.TSEC weighted index 0.007490 0.006325 1.184 0.236
L1.NIFTY 50 0.003297 0.006292 0.524 0.600
L1.Dow Jones Industrial Average -0.009688 0.008874 -1.092 0.275
L1.NYSE COMPOSITE (DJ) 0.066097 0.018221 3.627 0.000
L1.Russell 2000 -0.021071 0.073638 -0.286 0.775
L1.S&P/TSX Composite index 0.012820 0.005559 2.306 0.021
L1.NASDAQ Composite -0.011060 0.021236 -0.521 0.602
L1.FTSE 100 0.018324 0.011891 1.541 0.123
L1.DAX PERFORMANCE-INDEX 0.021647 0.008628 2.509 0.012
L1.CAC 40 0.031116 0.028275 1.100 0.271
L1.ESTX 50 PR.EUR -0.032557 0.036316 -0.896 0.370
L1.BEL 20 -0.049115 0.028096 -1.748 0.080
L1.IBOVESPA 0.001552 0.000552 2.809 0.005
L1.IPC MEXICO 0.001109 0.001270 0.873 0.383
L1.S&P/CLX IPSA 0.035364 0.011289 3.133 0.002
L1.MERVAL -0.003438 0.001849 -1.859 0.063
=====================================================================================================
Results for equation Nikkei 225
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.044703 3.240983 0.322 0.747
L1.SET 0.285072 0.352911 0.808 0.419
L1.VNI 1.106027 0.611101 1.810 0.070
L1.STI Index 0.240426 0.229439 1.048 0.295
L1.FTSE Bursa Malaysia KLCI -0.346314 0.504051 -0.687 0.492
L1.Composite Index -0.050050 0.103474 -0.484 0.629
L1.PSEi INDEX 0.023241 0.068330 0.340 0.734
L1.HANG SENG INDEX -0.017773 0.023233 -0.765 0.444
L1.Shenzhen Component -0.026522 0.021940 -1.209 0.227
L1.KOSPI Composite Index -0.328595 0.285742 -1.150 0.250
L1.Nikkei 225 -0.139028 0.022934 -6.062 0.000
L1.ALL ORDINARIES 0.116156 0.119240 0.974 0.330
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.125980 0.142452 0.884 0.376
L1.TSEC weighted index -0.060614 0.067761 -0.895 0.371
L1.NIFTY 50 0.106325 0.067412 1.577 0.115
L1.Dow Jones Industrial Average 0.213897 0.095071 2.250 0.024
L1.NYSE COMPOSITE (DJ) 0.168808 0.195221 0.865 0.387
L1.Russell 2000 0.577197 0.788948 0.732 0.464
L1.S&P/TSX Composite index 0.098345 0.059560 1.651 0.099
L1.NASDAQ Composite 0.372416 0.227520 1.637 0.102
L1.FTSE 100 -0.091026 0.127400 -0.714 0.475
L1.DAX PERFORMANCE-INDEX 0.124982 0.092444 1.352 0.176
L1.CAC 40 0.409280 0.302929 1.351 0.177
L1.ESTX 50 PR.EUR -0.096553 0.389081 -0.248 0.804
L1.BEL 20 0.114765 0.301011 0.381 0.703
L1.IBOVESPA -0.007127 0.005917 -1.204 0.228
L1.IPC MEXICO -0.026498 0.013608 -1.947 0.051
L1.S&P/CLX IPSA -0.021104 0.120947 -0.174 0.861
L1.MERVAL 0.036644 0.019808 1.850 0.064
=====================================================================================================
Results for equation ALL ORDINARIES
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const -0.044079 0.679271 -0.065 0.948
L1.SET 0.014254 0.073966 0.193 0.847
L1.VNI 0.125976 0.128079 0.984 0.325
L1.STI Index 0.026219 0.048088 0.545 0.586
L1.FTSE Bursa Malaysia KLCI -0.158457 0.105643 -1.500 0.134
L1.Composite Index -0.009873 0.021687 -0.455 0.649
L1.PSEi INDEX 0.012470 0.014321 0.871 0.384
L1.HANG SENG INDEX -0.007676 0.004869 -1.576 0.115
L1.Shenzhen Component -0.011876 0.004598 -2.583 0.010
L1.KOSPI Composite Index -0.101142 0.059888 -1.689 0.091
L1.Nikkei 225 -0.007572 0.004807 -1.575 0.115
L1.ALL ORDINARIES -0.066853 0.024991 -2.675 0.007
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.022215 0.029856 -0.744 0.457
L1.TSEC weighted index -0.028364 0.014202 -1.997 0.046
L1.NIFTY 50 0.016577 0.014129 1.173 0.241
L1.Dow Jones Industrial Average -0.004617 0.019926 -0.232 0.817
L1.NYSE COMPOSITE (DJ) 0.104240 0.040916 2.548 0.011
L1.Russell 2000 0.078916 0.165354 0.477 0.633
L1.S&P/TSX Composite index 0.055037 0.012483 4.409 0.000
L1.NASDAQ Composite 0.077354 0.047686 1.622 0.105
L1.FTSE 100 0.087702 0.026702 3.285 0.001
L1.DAX PERFORMANCE-INDEX 0.043584 0.019375 2.249 0.024
L1.CAC 40 0.063122 0.063490 0.994 0.320
L1.ESTX 50 PR.EUR -0.080207 0.081547 -0.984 0.325
L1.BEL 20 -0.066328 0.063088 -1.051 0.293
L1.IBOVESPA 0.002776 0.001240 2.238 0.025
L1.IPC MEXICO 0.000867 0.002852 0.304 0.761
L1.S&P/CLX IPSA 0.016860 0.025349 0.665 0.506
L1.MERVAL -0.004580 0.004151 -1.103 0.270
=====================================================================================================
Results for equation S&P/NZX 50 INDEX GROSS ( GROSS
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.745389 0.499879 3.492 0.000
L1.SET -0.033486 0.054432 -0.615 0.538
L1.VNI 0.090873 0.094254 0.964 0.335
L1.STI Index 0.061274 0.035388 1.731 0.083
L1.FTSE Bursa Malaysia KLCI -0.087987 0.077743 -1.132 0.258
L1.Composite Index -0.010801 0.015959 -0.677 0.499
L1.PSEi INDEX -0.009209 0.010539 -0.874 0.382
L1.HANG SENG INDEX -0.002772 0.003583 -0.774 0.439
L1.Shenzhen Component -0.000008 0.003384 -0.002 0.998
L1.KOSPI Composite Index -0.059074 0.044072 -1.340 0.180
L1.Nikkei 225 -0.002964 0.003537 -0.838 0.402
L1.ALL ORDINARIES 0.030136 0.018391 1.639 0.101
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.003155 0.021971 -0.144 0.886
L1.TSEC weighted index 0.007040 0.010451 0.674 0.501
L1.NIFTY 50 0.013532 0.010397 1.301 0.193
L1.Dow Jones Industrial Average -0.037961 0.014664 -2.589 0.010
L1.NYSE COMPOSITE (DJ) 0.098772 0.030110 3.280 0.001
L1.Russell 2000 -0.099375 0.121685 -0.817 0.414
L1.S&P/TSX Composite index 0.007224 0.009186 0.786 0.432
L1.NASDAQ Composite 0.083503 0.035092 2.380 0.017
L1.FTSE 100 0.016871 0.019650 0.859 0.391
L1.DAX PERFORMANCE-INDEX 0.042178 0.014258 2.958 0.003
L1.CAC 40 -0.010137 0.046723 -0.217 0.828
L1.ESTX 50 PR.EUR -0.096016 0.060011 -1.600 0.110
L1.BEL 20 -0.006074 0.046427 -0.131 0.896
L1.IBOVESPA -0.000275 0.000913 -0.301 0.763
L1.IPC MEXICO 0.007938 0.002099 3.782 0.000
L1.S&P/CLX IPSA 0.006941 0.018654 0.372 0.710
L1.MERVAL 0.000334 0.003055 0.109 0.913
=====================================================================================================
Results for equation TSEC weighted index
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.107717 1.290925 0.083 0.934
L1.SET 0.155236 0.140569 1.104 0.269
L1.VNI 0.350443 0.243410 1.440 0.150
L1.STI Index 0.132787 0.091389 1.453 0.146
L1.FTSE Bursa Malaysia KLCI -0.319325 0.200770 -1.591 0.112
L1.Composite Index -0.072094 0.041215 -1.749 0.080
L1.PSEi INDEX -0.014090 0.027217 -0.518 0.605
L1.HANG SENG INDEX 0.006727 0.009254 0.727 0.467
L1.Shenzhen Component -0.026134 0.008739 -2.991 0.003
L1.KOSPI Composite Index -0.018490 0.113815 -0.162 0.871
L1.Nikkei 225 -0.024477 0.009135 -2.680 0.007
L1.ALL ORDINARIES 0.019471 0.047495 0.410 0.682
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.012792 0.056741 0.225 0.822
L1.TSEC weighted index -0.052973 0.026990 -1.963 0.050
L1.NIFTY 50 0.040220 0.026851 1.498 0.134
L1.Dow Jones Industrial Average 0.004153 0.037868 0.110 0.913
L1.NYSE COMPOSITE (DJ) 0.139318 0.077759 1.792 0.073
L1.Russell 2000 -0.740609 0.314248 -2.357 0.018
L1.S&P/TSX Composite index 0.044039 0.023724 1.856 0.063
L1.NASDAQ Composite 0.315228 0.090624 3.478 0.001
L1.FTSE 100 0.084027 0.050745 1.656 0.098
L1.DAX PERFORMANCE-INDEX -0.017056 0.036822 -0.463 0.643
L1.CAC 40 0.295849 0.120660 2.452 0.014
L1.ESTX 50 PR.EUR -0.153168 0.154976 -0.988 0.323
L1.BEL 20 -0.322897 0.119897 -2.693 0.007
L1.IBOVESPA 0.008962 0.002357 3.802 0.000
L1.IPC MEXICO 0.004545 0.005420 0.838 0.402
L1.S&P/CLX IPSA 0.135523 0.048175 2.813 0.005
L1.MERVAL -0.001453 0.007890 -0.184 0.854
=====================================================================================================
Results for equation NIFTY 50
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.393218 1.162775 1.198 0.231
L1.SET -0.098680 0.126615 -0.779 0.436
L1.VNI -0.127417 0.219246 -0.581 0.561
L1.STI Index -0.121191 0.082316 -1.472 0.141
L1.FTSE Bursa Malaysia KLCI -0.328904 0.180840 -1.819 0.069
L1.Composite Index 0.073831 0.037123 1.989 0.047
L1.PSEi INDEX 0.013746 0.024515 0.561 0.575
L1.HANG SENG INDEX 0.010170 0.008335 1.220 0.222
L1.Shenzhen Component -0.029194 0.007872 -3.709 0.000
L1.KOSPI Composite Index 0.083198 0.102516 0.812 0.417
L1.Nikkei 225 -0.005380 0.008228 -0.654 0.513
L1.ALL ORDINARIES -0.014662 0.042780 -0.343 0.732
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.019175 0.051108 -0.375 0.708
L1.TSEC weighted index 0.030026 0.024311 1.235 0.217
L1.NIFTY 50 -0.033394 0.024186 -1.381 0.167
L1.Dow Jones Industrial Average -0.076518 0.034109 -2.243 0.025
L1.NYSE COMPOSITE (DJ) 0.171424 0.070040 2.448 0.014
L1.Russell 2000 -0.457916 0.283053 -1.618 0.106
L1.S&P/TSX Composite index 0.013047 0.021369 0.611 0.541
L1.NASDAQ Composite 0.360003 0.081628 4.410 0.000
L1.FTSE 100 -0.006902 0.045708 -0.151 0.880
L1.DAX PERFORMANCE-INDEX 0.061999 0.033166 1.869 0.062
L1.CAC 40 -0.011514 0.108683 -0.106 0.916
L1.ESTX 50 PR.EUR -0.096659 0.139591 -0.692 0.489
L1.BEL 20 -0.203557 0.107995 -1.885 0.059
L1.IBOVESPA 0.003454 0.002123 1.627 0.104
L1.IPC MEXICO 0.006470 0.004882 1.325 0.185
L1.S&P/CLX IPSA 0.054244 0.043392 1.250 0.211
L1.MERVAL 0.010308 0.007106 1.450 0.147
=====================================================================================================
Results for equation Dow Jones Industrial Average
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 6.042784 2.359274 2.561 0.010
L1.SET -0.199191 0.256902 -0.775 0.438
L1.VNI 0.219559 0.444851 0.494 0.622
L1.STI Index -0.005460 0.167020 -0.033 0.974
L1.FTSE Bursa Malaysia KLCI -0.552227 0.366924 -1.505 0.132
L1.Composite Index 0.074784 0.075324 0.993 0.321
L1.PSEi INDEX -0.007008 0.049741 -0.141 0.888
L1.HANG SENG INDEX 0.029377 0.016913 1.737 0.082
L1.Shenzhen Component -0.030479 0.015971 -1.908 0.056
L1.KOSPI Composite Index -0.157489 0.208006 -0.757 0.449
L1.Nikkei 225 -0.002111 0.016695 -0.126 0.899
L1.ALL ORDINARIES 0.088185 0.086801 1.016 0.310
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.063692 0.103698 0.614 0.539
L1.TSEC weighted index 0.044959 0.049327 0.911 0.362
L1.NIFTY 50 -0.068760 0.049073 -1.401 0.161
L1.Dow Jones Industrial Average -0.014148 0.069207 -0.204 0.838
L1.NYSE COMPOSITE (DJ) -0.118512 0.142111 -0.834 0.404
L1.Russell 2000 -0.014898 0.574315 -0.026 0.979
L1.S&P/TSX Composite index 0.076811 0.043357 1.772 0.076
L1.NASDAQ Composite -0.174579 0.165624 -1.054 0.292
L1.FTSE 100 0.032614 0.092741 0.352 0.725
L1.DAX PERFORMANCE-INDEX 0.084742 0.067295 1.259 0.208
L1.CAC 40 0.041560 0.220517 0.188 0.851
L1.ESTX 50 PR.EUR -0.149914 0.283231 -0.529 0.597
L1.BEL 20 -0.007837 0.219121 -0.036 0.971
L1.IBOVESPA 0.002975 0.004308 0.691 0.490
L1.IPC MEXICO 0.007937 0.009906 0.801 0.423
L1.S&P/CLX IPSA -0.144781 0.088043 -1.644 0.100
L1.MERVAL 0.006820 0.014419 0.473 0.636
=====================================================================================================
Results for equation NYSE COMPOSITE (DJ)
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 2.351881 1.562859 1.505 0.132
L1.SET -0.307917 0.170180 -1.809 0.070
L1.VNI 0.183516 0.294684 0.623 0.533
L1.STI Index -0.048841 0.110640 -0.441 0.659
L1.FTSE Bursa Malaysia KLCI -0.371087 0.243062 -1.527 0.127
L1.Composite Index 0.035657 0.049897 0.715 0.475
L1.PSEi INDEX 0.008019 0.032950 0.243 0.808
L1.HANG SENG INDEX 0.015323 0.011203 1.368 0.171
L1.Shenzhen Component -0.021362 0.010580 -2.019 0.043
L1.KOSPI Composite Index -0.121681 0.137790 -0.883 0.377
L1.Nikkei 225 0.001853 0.011059 0.168 0.867
L1.ALL ORDINARIES 0.030293 0.057500 0.527 0.598
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.038775 0.068693 0.564 0.572
L1.TSEC weighted index 0.041434 0.032675 1.268 0.205
L1.NIFTY 50 -0.030539 0.032507 -0.939 0.347
L1.Dow Jones Industrial Average -0.023268 0.045845 -0.508 0.612
L1.NYSE COMPOSITE (DJ) -0.077520 0.094139 -0.823 0.410
L1.Russell 2000 -0.162762 0.380444 -0.428 0.669
L1.S&P/TSX Composite index 0.035950 0.028721 1.252 0.211
L1.NASDAQ Composite 0.014324 0.109714 0.131 0.896
L1.FTSE 100 0.051179 0.061435 0.833 0.405
L1.DAX PERFORMANCE-INDEX 0.028503 0.044578 0.639 0.523
L1.CAC 40 0.032897 0.146078 0.225 0.822
L1.ESTX 50 PR.EUR -0.041122 0.187622 -0.219 0.827
L1.BEL 20 0.029391 0.145153 0.202 0.840
L1.IBOVESPA 0.003435 0.002853 1.204 0.229
L1.IPC MEXICO 0.003186 0.006562 0.486 0.627
L1.S&P/CLX IPSA -0.091713 0.058323 -1.573 0.116
L1.MERVAL -0.000418 0.009552 -0.044 0.965
=====================================================================================================
Results for equation Russell 2000
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.389227 0.215325 1.808 0.071
L1.SET -0.040141 0.023447 -1.712 0.087
L1.VNI 0.016720 0.040600 0.412 0.680
L1.STI Index -0.011257 0.015244 -0.738 0.460
L1.FTSE Bursa Malaysia KLCI -0.062137 0.033488 -1.856 0.064
L1.Composite Index 0.008625 0.006875 1.255 0.210
L1.PSEi INDEX 0.001670 0.004540 0.368 0.713
L1.HANG SENG INDEX 0.001069 0.001544 0.693 0.489
L1.Shenzhen Component -0.000817 0.001458 -0.560 0.575
L1.KOSPI Composite Index -0.012647 0.018984 -0.666 0.505
L1.Nikkei 225 0.000826 0.001524 0.542 0.588
L1.ALL ORDINARIES 0.007118 0.007922 0.898 0.369
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.006579 0.009464 0.695 0.487
L1.TSEC weighted index 0.007606 0.004502 1.689 0.091
L1.NIFTY 50 -0.006752 0.004479 -1.508 0.132
L1.Dow Jones Industrial Average -0.004051 0.006316 -0.641 0.521
L1.NYSE COMPOSITE (DJ) 0.002013 0.012970 0.155 0.877
L1.Russell 2000 -0.062428 0.052416 -1.191 0.234
L1.S&P/TSX Composite index 0.001007 0.003957 0.254 0.799
L1.NASDAQ Composite -0.000221 0.015116 -0.015 0.988
L1.FTSE 100 0.005273 0.008464 0.623 0.533
L1.DAX PERFORMANCE-INDEX 0.005864 0.006142 0.955 0.340
L1.CAC 40 0.017945 0.020126 0.892 0.373
L1.ESTX 50 PR.EUR -0.026476 0.025850 -1.024 0.306
L1.BEL 20 0.003748 0.019999 0.187 0.851
L1.IBOVESPA 0.000467 0.000393 1.188 0.235
L1.IPC MEXICO -0.000470 0.000904 -0.520 0.603
L1.S&P/CLX IPSA -0.015526 0.008035 -1.932 0.053
L1.MERVAL -0.000742 0.001316 -0.564 0.573
=====================================================================================================
Results for equation S&P/TSX Composite index
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.420790 1.894688 0.750 0.453
L1.SET -0.454399 0.206313 -2.202 0.028
L1.VNI 0.141786 0.357252 0.397 0.691
L1.STI Index -0.324492 0.134131 -2.419 0.016
L1.FTSE Bursa Malaysia KLCI -0.333104 0.294670 -1.130 0.258
L1.Composite Index 0.063958 0.060491 1.057 0.290
L1.PSEi INDEX 0.029802 0.039946 0.746 0.456
L1.HANG SENG INDEX 0.011822 0.013582 0.870 0.384
L1.Shenzhen Component -0.023706 0.012826 -1.848 0.065
L1.KOSPI Composite Index -0.210553 0.167046 -1.260 0.208
L1.Nikkei 225 0.012470 0.013407 0.930 0.352
L1.ALL ORDINARIES 0.045732 0.069708 0.656 0.512
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.015942 0.083278 0.191 0.848
L1.TSEC weighted index 0.036631 0.039613 0.925 0.355
L1.NIFTY 50 0.001973 0.039409 0.050 0.960
L1.Dow Jones Industrial Average -0.090438 0.055579 -1.627 0.104
L1.NYSE COMPOSITE (DJ) 0.140418 0.114127 1.230 0.219
L1.Russell 2000 -0.315042 0.461221 -0.683 0.495
L1.S&P/TSX Composite index 0.037441 0.034819 1.075 0.282
L1.NASDAQ Composite 0.054911 0.133009 0.413 0.680
L1.FTSE 100 0.042133 0.074479 0.566 0.572
L1.DAX PERFORMANCE-INDEX 0.028719 0.054043 0.531 0.595
L1.CAC 40 0.257965 0.177093 1.457 0.145
L1.ESTX 50 PR.EUR -0.310466 0.227458 -1.365 0.172
L1.BEL 20 0.034365 0.175972 0.195 0.845
L1.IBOVESPA 0.003298 0.003459 0.953 0.340
L1.IPC MEXICO 0.001919 0.007955 0.241 0.809
L1.S&P/CLX IPSA -0.083278 0.070706 -1.178 0.239
L1.MERVAL -0.002100 0.011580 -0.181 0.856
=====================================================================================================
Results for equation NASDAQ Composite
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 2.058855 0.728001 2.828 0.005
L1.SET -0.091489 0.079272 -1.154 0.248
L1.VNI 0.007782 0.137268 0.057 0.955
L1.STI Index 0.002998 0.051537 0.058 0.954
L1.FTSE Bursa Malaysia KLCI -0.180750 0.113222 -1.596 0.110
L1.Composite Index 0.016255 0.023243 0.699 0.484
L1.PSEi INDEX -0.006156 0.015349 -0.401 0.688
L1.HANG SENG INDEX 0.002098 0.005219 0.402 0.688
L1.Shenzhen Component -0.008950 0.004928 -1.816 0.069
L1.KOSPI Composite Index -0.018966 0.064184 -0.295 0.768
L1.Nikkei 225 0.006591 0.005151 1.279 0.201
L1.ALL ORDINARIES -0.003872 0.026784 -0.145 0.885
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.029772 0.031998 0.930 0.352
L1.TSEC weighted index 0.034343 0.015221 2.256 0.024
L1.NIFTY 50 -0.024235 0.015142 -1.600 0.109
L1.Dow Jones Industrial Average -0.035621 0.021355 -1.668 0.095
L1.NYSE COMPOSITE (DJ) 0.026737 0.043851 0.610 0.542
L1.Russell 2000 -0.293460 0.177216 -1.656 0.098
L1.S&P/TSX Composite index 0.017483 0.013379 1.307 0.191
L1.NASDAQ Composite 0.006325 0.051106 0.124 0.902
L1.FTSE 100 0.011026 0.028617 0.385 0.700
L1.DAX PERFORMANCE-INDEX 0.013998 0.020765 0.674 0.500
L1.CAC 40 0.089433 0.068045 1.314 0.189
L1.ESTX 50 PR.EUR -0.129947 0.087397 -1.487 0.137
L1.BEL 20 0.037040 0.067614 0.548 0.584
L1.IBOVESPA 0.000594 0.001329 0.447 0.655
L1.IPC MEXICO 0.004149 0.003057 1.357 0.175
L1.S&P/CLX IPSA -0.046593 0.027168 -1.715 0.086
L1.MERVAL -0.001092 0.004449 -0.246 0.806
=====================================================================================================
Results for equation FTSE 100
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.148919 1.032943 0.144 0.885
L1.SET -0.230094 0.112477 -2.046 0.041
L1.VNI 0.058681 0.194766 0.301 0.763
L1.STI Index -0.113875 0.073125 -1.557 0.119
L1.FTSE Bursa Malaysia KLCI -0.170946 0.160648 -1.064 0.287
L1.Composite Index 0.036932 0.032978 1.120 0.263
L1.PSEi INDEX 0.000904 0.021778 0.041 0.967
L1.HANG SENG INDEX 0.006862 0.007405 0.927 0.354
L1.Shenzhen Component -0.020156 0.006993 -2.882 0.004
L1.KOSPI Composite Index -0.000818 0.091070 -0.009 0.993
L1.Nikkei 225 -0.005888 0.007309 -0.806 0.420
L1.ALL ORDINARIES -0.010730 0.038003 -0.282 0.778
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.080376 0.045401 1.770 0.077
L1.TSEC weighted index 0.030424 0.021596 1.409 0.159
L1.NIFTY 50 0.007971 0.021485 0.371 0.711
L1.Dow Jones Industrial Average -0.012434 0.030300 -0.410 0.682
L1.NYSE COMPOSITE (DJ) 0.160732 0.062219 2.583 0.010
L1.Russell 2000 -0.560747 0.251448 -2.230 0.026
L1.S&P/TSX Composite index 0.058426 0.018983 3.078 0.002
L1.NASDAQ Composite 0.216895 0.072514 2.991 0.003
L1.FTSE 100 -0.090597 0.040604 -2.231 0.026
L1.DAX PERFORMANCE-INDEX 0.005434 0.029463 0.184 0.854
L1.CAC 40 -0.009520 0.096547 -0.099 0.921
L1.ESTX 50 PR.EUR -0.136804 0.124005 -1.103 0.270
L1.BEL 20 -0.116799 0.095936 -1.217 0.223
L1.IBOVESPA 0.004035 0.001886 2.139 0.032
L1.IPC MEXICO 0.002802 0.004337 0.646 0.518
L1.S&P/CLX IPSA 0.001540 0.038547 0.040 0.968
L1.MERVAL -0.006195 0.006313 -0.981 0.326
=====================================================================================================
Results for equation DAX PERFORMANCE-INDEX
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.967459 1.922598 1.023 0.306
L1.SET -0.183887 0.209352 -0.878 0.380
L1.VNI -0.236068 0.362514 -0.651 0.515
L1.STI Index -0.140144 0.136107 -1.030 0.303
L1.FTSE Bursa Malaysia KLCI -0.251795 0.299010 -0.842 0.400
L1.Composite Index 0.119389 0.061382 1.945 0.052
L1.PSEi INDEX -0.023300 0.040535 -0.575 0.565
L1.HANG SENG INDEX -0.000641 0.013782 -0.046 0.963
L1.Shenzhen Component -0.028411 0.013015 -2.183 0.029
L1.KOSPI Composite Index 0.034057 0.169506 0.201 0.841
L1.Nikkei 225 0.006156 0.013605 0.453 0.651
L1.ALL ORDINARIES -0.052744 0.070735 -0.746 0.456
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.100417 0.084505 1.188 0.235
L1.TSEC weighted index 0.069840 0.040197 1.737 0.082
L1.NIFTY 50 -0.049872 0.039990 -1.247 0.212
L1.Dow Jones Industrial Average 0.019420 0.056398 0.344 0.731
L1.NYSE COMPOSITE (DJ) 0.172815 0.115808 1.492 0.136
L1.Russell 2000 0.089340 0.468015 0.191 0.849
L1.S&P/TSX Composite index 0.059894 0.035332 1.695 0.090
L1.NASDAQ Composite 0.133070 0.134968 0.986 0.324
L1.FTSE 100 -0.136031 0.075576 -1.800 0.072
L1.DAX PERFORMANCE-INDEX -0.008417 0.054839 -0.153 0.878
L1.CAC 40 0.004486 0.179702 0.025 0.980
L1.ESTX 50 PR.EUR -0.165973 0.230808 -0.719 0.472
L1.BEL 20 -0.067085 0.178564 -0.376 0.707
L1.IBOVESPA 0.003337 0.003510 0.951 0.342
L1.IPC MEXICO -0.005338 0.008072 -0.661 0.508
L1.S&P/CLX IPSA 0.006199 0.071747 0.086 0.931
L1.MERVAL -0.010781 0.011750 -0.918 0.359
=====================================================================================================
Results for equation CAC 40
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.224253 0.926669 0.242 0.809
L1.SET -0.153912 0.100905 -1.525 0.127
L1.VNI -0.027235 0.174727 -0.156 0.876
L1.STI Index -0.066919 0.065602 -1.020 0.308
L1.FTSE Bursa Malaysia KLCI -0.111481 0.144119 -0.774 0.439
L1.Composite Index 0.050667 0.029585 1.713 0.087
L1.PSEi INDEX -0.010192 0.019537 -0.522 0.602
L1.HANG SENG INDEX 0.003047 0.006643 0.459 0.646
L1.Shenzhen Component -0.013293 0.006273 -2.119 0.034
L1.KOSPI Composite Index 0.013906 0.081700 0.170 0.865
L1.Nikkei 225 -0.000146 0.006557 -0.022 0.982
L1.ALL ORDINARIES -0.040114 0.034093 -1.177 0.239
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.058903 0.040730 1.446 0.148
L1.TSEC weighted index 0.025592 0.019374 1.321 0.187
L1.NIFTY 50 -0.026601 0.019275 -1.380 0.168
L1.Dow Jones Industrial Average 0.003557 0.027183 0.131 0.896
L1.NYSE COMPOSITE (DJ) 0.135392 0.055818 2.426 0.015
L1.Russell 2000 -0.235481 0.225578 -1.044 0.297
L1.S&P/TSX Composite index 0.021161 0.017030 1.243 0.214
L1.NASDAQ Composite 0.053078 0.065053 0.816 0.415
L1.FTSE 100 -0.052519 0.036427 -1.442 0.149
L1.DAX PERFORMANCE-INDEX -0.006012 0.026432 -0.227 0.820
L1.CAC 40 -0.040989 0.086614 -0.473 0.636
L1.ESTX 50 PR.EUR -0.052160 0.111247 -0.469 0.639
L1.BEL 20 -0.044117 0.086066 -0.513 0.608
L1.IBOVESPA 0.002302 0.001692 1.361 0.174
L1.IPC MEXICO 0.001422 0.003891 0.366 0.715
L1.S&P/CLX IPSA -0.005563 0.034581 -0.161 0.872
L1.MERVAL -0.004507 0.005663 -0.796 0.426
=====================================================================================================
Results for equation ESTX 50 PR.EUR
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const -0.066962 0.676614 -0.099 0.921
L1.SET -0.096491 0.073677 -1.310 0.190
L1.VNI -0.035796 0.127579 -0.281 0.779
L1.STI Index -0.027626 0.047900 -0.577 0.564
L1.FTSE Bursa Malaysia KLCI -0.098100 0.105230 -0.932 0.351
L1.Composite Index 0.019340 0.021602 0.895 0.371
L1.PSEi INDEX -0.008125 0.014265 -0.570 0.569
L1.HANG SENG INDEX 0.004152 0.004850 0.856 0.392
L1.Shenzhen Component -0.012302 0.004580 -2.686 0.007
L1.KOSPI Composite Index -0.004236 0.059654 -0.071 0.943
L1.Nikkei 225 0.000390 0.004788 0.082 0.935
L1.ALL ORDINARIES -0.030040 0.024894 -1.207 0.228
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.035669 0.029739 1.199 0.230
L1.TSEC weighted index 0.015276 0.014146 1.080 0.280
L1.NIFTY 50 -0.019075 0.014074 -1.355 0.175
L1.Dow Jones Industrial Average -0.004596 0.019848 -0.232 0.817
L1.NYSE COMPOSITE (DJ) 0.119951 0.040756 2.943 0.003
L1.Russell 2000 -0.208543 0.164707 -1.266 0.205
L1.S&P/TSX Composite index 0.008202 0.012434 0.660 0.509
L1.NASDAQ Composite 0.030573 0.047499 0.644 0.520
L1.FTSE 100 -0.048572 0.026597 -1.826 0.068
L1.DAX PERFORMANCE-INDEX 0.031014 0.019299 1.607 0.108
L1.CAC 40 0.131697 0.063242 2.082 0.037
L1.ESTX 50 PR.EUR -0.366372 0.081228 -4.510 0.000
L1.BEL 20 -0.000416 0.062842 -0.007 0.995
L1.IBOVESPA 0.001896 0.001235 1.535 0.125
L1.IPC MEXICO 0.001527 0.002841 0.538 0.591
L1.S&P/CLX IPSA -0.001902 0.025250 -0.075 0.940
L1.MERVAL -0.005122 0.004135 -1.239 0.215
=====================================================================================================
Results for equation BEL 20
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.310238 0.570150 0.544 0.586
L1.SET -0.117818 0.062084 -1.898 0.058
L1.VNI -0.033937 0.107504 -0.316 0.752
L1.STI Index -0.043728 0.040363 -1.083 0.279
L1.FTSE Bursa Malaysia KLCI -0.098523 0.088672 -1.111 0.267
L1.Composite Index 0.032728 0.018203 1.798 0.072
L1.PSEi INDEX 0.000901 0.012021 0.075 0.940
L1.HANG SENG INDEX 0.001850 0.004087 0.453 0.651
L1.Shenzhen Component -0.008869 0.003860 -2.298 0.022
L1.KOSPI Composite Index -0.038872 0.050267 -0.773 0.439
L1.Nikkei 225 -0.000970 0.004034 -0.240 0.810
L1.ALL ORDINARIES -0.017629 0.020977 -0.840 0.401
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.041101 0.025060 1.640 0.101
L1.TSEC weighted index 0.015010 0.011920 1.259 0.208
L1.NIFTY 50 -0.016242 0.011859 -1.370 0.171
L1.Dow Jones Industrial Average 0.003654 0.016725 0.219 0.827
L1.NYSE COMPOSITE (DJ) 0.068685 0.034343 2.000 0.046
L1.Russell 2000 -0.172206 0.138791 -1.241 0.215
L1.S&P/TSX Composite index 0.008930 0.010478 0.852 0.394
L1.NASDAQ Composite 0.090848 0.040025 2.270 0.023
L1.FTSE 100 -0.042806 0.022412 -1.910 0.056
L1.DAX PERFORMANCE-INDEX -0.001002 0.016263 -0.062 0.951
L1.CAC 40 0.051218 0.053291 0.961 0.337
L1.ESTX 50 PR.EUR -0.093105 0.068447 -1.360 0.174
L1.BEL 20 -0.040651 0.052954 -0.768 0.443
L1.IBOVESPA 0.000823 0.001041 0.791 0.429
L1.IPC MEXICO 0.000195 0.002394 0.082 0.935
L1.S&P/CLX IPSA 0.008311 0.021277 0.391 0.696
L1.MERVAL -0.002877 0.003485 -0.826 0.409
=====================================================================================================
Results for equation IBOVESPA
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 5.237910 14.891698 0.352 0.725
L1.SET -1.945022 1.621560 -1.199 0.230
L1.VNI 1.962067 2.807895 0.699 0.485
L1.STI Index -1.872597 1.054229 -1.776 0.076
L1.FTSE Bursa Malaysia KLCI -2.405708 2.316019 -1.039 0.299
L1.Composite Index -0.262799 0.475442 -0.553 0.580
L1.PSEi INDEX -0.066614 0.313965 -0.212 0.832
L1.HANG SENG INDEX 0.128945 0.106752 1.208 0.227
L1.Shenzhen Component -0.162451 0.100811 -1.611 0.107
L1.KOSPI Composite Index 0.676528 1.312931 0.515 0.606
L1.Nikkei 225 -0.192894 0.105376 -1.831 0.067
L1.ALL ORDINARIES 0.999355 0.547887 1.824 0.068
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.425901 0.654541 0.651 0.515
L1.TSEC weighted index 0.052481 0.311348 0.169 0.866
L1.NIFTY 50 0.374668 0.309747 1.210 0.226
L1.Dow Jones Industrial Average -0.894607 0.436834 -2.048 0.041
L1.NYSE COMPOSITE (DJ) 0.997010 0.897004 1.111 0.266
L1.Russell 2000 -6.192990 3.625065 -1.708 0.088
L1.S&P/TSX Composite index 0.817274 0.273668 2.986 0.003
L1.NASDAQ Composite 1.101792 1.045413 1.054 0.292
L1.FTSE 100 -0.122767 0.585380 -0.210 0.834
L1.DAX PERFORMANCE-INDEX 0.505310 0.424763 1.190 0.234
L1.CAC 40 1.404800 1.391900 1.009 0.313
L1.ESTX 50 PR.EUR -1.148035 1.787751 -0.642 0.521
L1.BEL 20 -1.632838 1.383090 -1.181 0.238
L1.IBOVESPA -0.073840 0.027189 -2.716 0.007
L1.IPC MEXICO 0.096683 0.062526 1.546 0.122
L1.S&P/CLX IPSA -0.441121 0.555728 -0.794 0.427
L1.MERVAL 0.068428 0.091013 0.752 0.452
=====================================================================================================
Results for equation IPC MEXICO
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 4.815634 6.598825 0.730 0.466
L1.SET -0.648867 0.718547 -0.903 0.367
L1.VNI 1.662978 1.244237 1.337 0.181
L1.STI Index -0.392409 0.467151 -0.840 0.401
L1.FTSE Bursa Malaysia KLCI -1.459753 1.026277 -1.422 0.155
L1.Composite Index 0.382806 0.210678 1.817 0.069
L1.PSEi INDEX -0.122643 0.139124 -0.882 0.378
L1.HANG SENG INDEX 0.082340 0.047304 1.741 0.082
L1.Shenzhen Component -0.089336 0.044672 -2.000 0.046
L1.KOSPI Composite Index -0.241754 0.581787 -0.416 0.678
L1.Nikkei 225 -0.045817 0.046694 -0.981 0.326
L1.ALL ORDINARIES 0.041267 0.242780 0.170 0.865
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.177954 0.290041 0.614 0.540
L1.TSEC weighted index 0.216481 0.137965 1.569 0.117
L1.NIFTY 50 -0.041498 0.137255 -0.302 0.762
L1.Dow Jones Industrial Average -0.314845 0.193570 -1.627 0.104
L1.NYSE COMPOSITE (DJ) 0.746082 0.397481 1.877 0.061
L1.Russell 2000 -2.325527 1.606343 -1.448 0.148
L1.S&P/TSX Composite index 0.136407 0.121268 1.125 0.261
L1.NASDAQ Composite 0.369930 0.463245 0.799 0.425
L1.FTSE 100 -0.365630 0.259394 -1.410 0.159
L1.DAX PERFORMANCE-INDEX 0.328833 0.188221 1.747 0.081
L1.CAC 40 -0.038751 0.616780 -0.063 0.950
L1.ESTX 50 PR.EUR -0.605367 0.792190 -0.764 0.445
L1.BEL 20 -0.377141 0.612876 -0.615 0.538
L1.IBOVESPA 0.002652 0.012048 0.220 0.826
L1.IPC MEXICO 0.019389 0.027706 0.700 0.484
L1.S&P/CLX IPSA -0.106614 0.246255 -0.433 0.665
L1.MERVAL 0.077897 0.040330 1.931 0.053
=====================================================================================================
Results for equation S&P/CLX IPSA
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.565407 0.660380 0.856 0.392
L1.SET -0.049772 0.071909 -0.692 0.489
L1.VNI 0.151167 0.124518 1.214 0.225
L1.STI Index -0.105945 0.046750 -2.266 0.023
L1.FTSE Bursa Malaysia KLCI -0.128479 0.102705 -1.251 0.211
L1.Composite Index 0.077746 0.021084 3.688 0.000
L1.PSEi INDEX -0.018585 0.013923 -1.335 0.182
L1.HANG SENG INDEX 0.007701 0.004734 1.627 0.104
L1.Shenzhen Component -0.015266 0.004471 -3.415 0.001
L1.KOSPI Composite Index -0.065214 0.058223 -1.120 0.263
L1.Nikkei 225 -0.003116 0.004673 -0.667 0.505
L1.ALL ORDINARIES -0.014443 0.024296 -0.594 0.552
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.016087 0.029026 0.554 0.579
L1.TSEC weighted index 0.006689 0.013807 0.484 0.628
L1.NIFTY 50 0.006836 0.013736 0.498 0.619
L1.Dow Jones Industrial Average -0.013120 0.019372 -0.677 0.498
L1.NYSE COMPOSITE (DJ) 0.037660 0.039778 0.947 0.344
L1.Russell 2000 -0.117132 0.160755 -0.729 0.466
L1.S&P/TSX Composite index 0.027635 0.012136 2.277 0.023
L1.NASDAQ Composite 0.039379 0.046359 0.849 0.396
L1.FTSE 100 -0.009718 0.025959 -0.374 0.708
L1.DAX PERFORMANCE-INDEX 0.004579 0.018836 0.243 0.808
L1.CAC 40 0.021779 0.061725 0.353 0.724
L1.ESTX 50 PR.EUR -0.079802 0.079279 -1.007 0.314
L1.BEL 20 -0.023464 0.061334 -0.383 0.702
L1.IBOVESPA 0.002947 0.001206 2.444 0.015
L1.IPC MEXICO 0.002757 0.002773 0.994 0.320
L1.S&P/CLX IPSA 0.080910 0.024644 3.283 0.001
L1.MERVAL 0.001819 0.004036 0.451 0.652
=====================================================================================================
Results for equation MERVAL
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 11.622486 3.752633 3.097 0.002
L1.SET -0.473951 0.408625 -1.160 0.246
L1.VNI -0.164416 0.707575 -0.232 0.816
L1.STI Index -0.223888 0.265660 -0.843 0.399
L1.FTSE Bursa Malaysia KLCI 0.052288 0.583625 0.090 0.929
L1.Composite Index -0.018736 0.119809 -0.156 0.876
L1.PSEi INDEX 0.029481 0.079118 0.373 0.709
L1.HANG SENG INDEX 0.019733 0.026901 0.734 0.463
L1.Shenzhen Component -0.007116 0.025404 -0.280 0.779
L1.KOSPI Composite Index 0.261280 0.330852 0.790 0.430
L1.Nikkei 225 -0.040702 0.026554 -1.533 0.125
L1.ALL ORDINARIES 0.151551 0.138065 1.098 0.272
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.068990 0.164941 -0.418 0.676
L1.TSEC weighted index -0.011430 0.078458 -0.146 0.884
L1.NIFTY 50 0.021833 0.078055 0.280 0.780
L1.Dow Jones Industrial Average -0.217314 0.110080 -1.974 0.048
L1.NYSE COMPOSITE (DJ) 0.144808 0.226040 0.641 0.522
L1.Russell 2000 -0.415908 0.913498 -0.455 0.649
L1.S&P/TSX Composite index 0.075251 0.068963 1.091 0.275
L1.NASDAQ Composite 0.369765 0.263439 1.404 0.160
L1.FTSE 100 -0.016023 0.147513 -0.109 0.914
L1.DAX PERFORMANCE-INDEX 0.141654 0.107038 1.323 0.186
L1.CAC 40 0.178150 0.350752 0.508 0.612
L1.ESTX 50 PR.EUR -0.465402 0.450504 -1.033 0.302
L1.BEL 20 -0.277083 0.348532 -0.795 0.427
L1.IBOVESPA -0.001485 0.006852 -0.217 0.828
L1.IPC MEXICO 0.011944 0.015756 0.758 0.448
L1.S&P/CLX IPSA -0.022670 0.140041 -0.162 0.871
L1.MERVAL 0.044161 0.022935 1.925 0.054
=====================================================================================================
Correlation matrix of residuals
SET VNI STI Index FTSE Bursa Malaysia KLCI Composite Index PSEi INDEX HANG SENG INDEX Shenzhen Component KOSPI Composite Index Nikkei 225 ALL ORDINARIES S&P/NZX 50 INDEX GROSS ( GROSS TSEC weighted index NIFTY 50 Dow Jones Industrial Average NYSE COMPOSITE (DJ) Russell 2000 S&P/TSX Composite index NASDAQ Composite FTSE 100 DAX PERFORMANCE-INDEX CAC 40 ESTX 50 PR.EUR BEL 20 IBOVESPA IPC MEXICO S&P/CLX IPSA MERVAL
SET 1.000000 0.091746 0.399098 0.303999 0.387547 0.276421 0.368846 0.162146 0.289636 0.213196 0.244583 0.137959 0.283968 0.353833 0.210013 0.244560 0.197087 0.229980 0.208588 0.285666 0.281206 0.283829 0.267344 0.284370 0.165625 0.246910 0.219204 0.111275
VNI 0.091746 1.000000 0.116876 0.131814 0.083149 0.112822 0.128269 0.081191 0.085807 0.104103 0.125459 0.086405 0.124687 0.100181 0.091815 0.087052 0.070593 0.062753 0.090261 0.075409 0.082645 0.095138 0.086302 0.089301 0.049315 0.047632 0.055143 0.077693
STI Index 0.399098 0.116876 1.000000 0.393381 0.418465 0.262831 0.578549 0.252167 0.454188 0.368429 0.460607 0.216456 0.457166 0.422596 0.306399 0.346646 0.280416 0.335336 0.291471 0.409935 0.372573 0.406093 0.392346 0.393716 0.247495 0.273321 0.282815 0.134600
FTSE Bursa Malaysia KLCI 0.303999 0.131814 0.393381 1.000000 0.409643 0.330924 0.352826 0.109266 0.315138 0.268746 0.284785 0.176605 0.366616 0.258566 0.149773 0.174943 0.142094 0.168445 0.163159 0.224033 0.210760 0.215259 0.211135 0.215067 0.145155 0.220493 0.227177 0.080279
Composite Index 0.387547 0.083149 0.418465 0.409643 1.000000 0.359557 0.379314 0.168805 0.332753 0.203696 0.266869 0.136836 0.350891 0.340776 0.165626 0.197353 0.150378 0.204844 0.161361 0.233919 0.212022 0.228062 0.220798 0.227278 0.171468 0.236461 0.260783 0.102816
PSEi INDEX 0.276421 0.112822 0.262831 0.330924 0.359557 1.000000 0.250418 0.128843 0.235659 0.245133 0.210009 0.206513 0.285617 0.232362 0.092509 0.102508 0.078764 0.113839 0.105312 0.144888 0.128185 0.119768 0.116707 0.118892 0.085780 0.176790 0.179143 0.070007
HANG SENG INDEX 0.368846 0.128269 0.578549 0.352826 0.379314 0.250418 1.000000 0.433815 0.506504 0.367137 0.446708 0.176188 0.501667 0.424979 0.237072 0.290452 0.232071 0.268928 0.265246 0.379380 0.346507 0.364192 0.350253 0.348244 0.278434 0.277335 0.270282 0.142198
Shenzhen Component 0.162146 0.081191 0.252167 0.109266 0.168805 0.128843 0.433815 1.000000 0.205305 0.170545 0.189251 0.057166 0.252173 0.164211 0.121386 0.144762 0.119133 0.144906 0.149129 0.159082 0.134450 0.154396 0.142804 0.150712 0.122767 0.122758 0.118085 0.072225
KOSPI Composite Index 0.289636 0.085807 0.454188 0.315138 0.332753 0.235659 0.506504 0.205305 1.000000 0.345690 0.437158 0.172700 0.578582 0.333354 0.223002 0.254886 0.205655 0.224711 0.227660 0.291854 0.255919 0.267714 0.255582 0.262987 0.210297 0.242381 0.247958 0.115926
Nikkei 225 0.213196 0.104103 0.368429 0.268746 0.203696 0.245133 0.367137 0.170545 0.345690 1.000000 0.376921 0.253309 0.352555 0.267101 0.200882 0.216807 0.174447 0.167009 0.194104 0.249045 0.255360 0.269054 0.263562 0.264835 0.097633 0.184355 0.124926 0.129774
ALL ORDINARIES 0.244583 0.125459 0.460607 0.284785 0.266869 0.210009 0.446708 0.189251 0.437158 0.376921 1.000000 0.365617 0.431637 0.275319 0.227862 0.268240 0.229989 0.251773 0.239171 0.343737 0.274196 0.306544 0.286303 0.316831 0.180873 0.232621 0.230815 0.104893
S&P/NZX 50 INDEX GROSS ( GROSS 0.137959 0.086405 0.216456 0.176605 0.136836 0.206513 0.176188 0.057166 0.172700 0.253309 0.365617 1.000000 0.206003 0.158913 0.092770 0.099102 0.081138 0.095023 0.094508 0.132833 0.113145 0.124602 0.115991 0.138063 0.049125 0.089011 0.073290 0.079608
TSEC weighted index 0.283968 0.124687 0.457166 0.366616 0.350891 0.285617 0.501667 0.252173 0.578582 0.352555 0.431637 0.206003 1.000000 0.309926 0.207203 0.246802 0.210323 0.229936 0.222453 0.274915 0.250236 0.263785 0.252580 0.257164 0.184173 0.229045 0.244813 0.140675
NIFTY 50 0.353833 0.100181 0.422596 0.258566 0.340776 0.232362 0.424979 0.164211 0.333354 0.267101 0.275319 0.158913 0.309926 1.000000 0.293392 0.325298 0.278404 0.287180 0.287454 0.374822 0.378882 0.379926 0.372360 0.383574 0.250982 0.288133 0.264643 0.164276
Dow Jones Industrial Average 0.210013 0.091815 0.306399 0.149773 0.165626 0.092509 0.237072 0.121386 0.223002 0.200882 0.227862 0.092770 0.207203 0.293392 1.000000 0.943408 0.833918 0.698947 0.872114 0.628569 0.601991 0.636589 0.623776 0.607010 0.506126 0.562971 0.418295 0.373523
NYSE COMPOSITE (DJ) 0.244560 0.087052 0.346646 0.174943 0.197353 0.102508 0.290452 0.144762 0.254886 0.216807 0.268240 0.099102 0.246802 0.325298 0.943408 1.000000 0.888866 0.792751 0.870901 0.684280 0.630803 0.689534 0.677206 0.656803 0.581415 0.627799 0.471160 0.386562
Russell 2000 0.197087 0.070593 0.280416 0.142094 0.150378 0.078764 0.232071 0.119133 0.205655 0.174447 0.229989 0.081138 0.210323 0.278404 0.833918 0.888866 1.000000 0.698149 0.882167 0.567515 0.553299 0.578614 0.567324 0.556591 0.478459 0.554650 0.405847 0.318447
S&P/TSX Composite index 0.229980 0.062753 0.335336 0.168445 0.204844 0.113839 0.268928 0.144906 0.224711 0.167009 0.251773 0.095023 0.229936 0.287180 0.698947 0.792751 0.698149 1.000000 0.673765 0.588667 0.516952 0.565160 0.548685 0.537412 0.515990 0.541981 0.451815 0.359792
NASDAQ Composite 0.208588 0.090261 0.291471 0.163159 0.161361 0.105312 0.265246 0.149129 0.227660 0.194104 0.239171 0.094508 0.222453 0.287454 0.872114 0.870901 0.882167 0.673765 1.000000 0.568419 0.570190 0.581430 0.571885 0.562829 0.462993 0.541424 0.397378 0.360899
FTSE 100 0.285666 0.075409 0.409935 0.224033 0.233919 0.144888 0.379380 0.159082 0.291854 0.249045 0.343737 0.132833 0.274915 0.374822 0.628569 0.684280 0.567515 0.588667 0.568419 1.000000 0.792176 0.850358 0.827926 0.818090 0.452838 0.508077 0.436641 0.273697
DAX PERFORMANCE-INDEX 0.281206 0.082645 0.372573 0.210760 0.212022 0.128185 0.346507 0.134450 0.255919 0.255360 0.274196 0.113145 0.250236 0.378882 0.601991 0.630803 0.553299 0.516952 0.570190 0.792176 1.000000 0.912058 0.918540 0.871127 0.361406 0.468303 0.377736 0.266660
CAC 40 0.283829 0.095138 0.406093 0.215259 0.228062 0.119768 0.364192 0.154396 0.267714 0.269054 0.306544 0.124602 0.263785 0.379926 0.636589 0.689534 0.578614 0.565160 0.581430 0.850358 0.912058 1.000000 0.966800 0.914380 0.426232 0.499063 0.411217 0.281366
ESTX 50 PR.EUR 0.267344 0.086302 0.392346 0.211135 0.220798 0.116707 0.350253 0.142804 0.255582 0.263562 0.286303 0.115991 0.252580 0.372360 0.623776 0.677206 0.567324 0.548685 0.571885 0.827926 0.918540 0.966800 1.000000 0.907414 0.411901 0.484588 0.401572 0.272603
BEL 20 0.284370 0.089301 0.393716 0.215067 0.227278 0.118892 0.348244 0.150712 0.262987 0.264835 0.316831 0.138063 0.257164 0.383574 0.607010 0.656803 0.556591 0.537412 0.562829 0.818090 0.871127 0.914380 0.907414 1.000000 0.407750 0.479460 0.394006 0.280055
IBOVESPA 0.165625 0.049315 0.247495 0.145155 0.171468 0.085780 0.278434 0.122767 0.210297 0.097633 0.180873 0.049125 0.184173 0.250982 0.506126 0.581415 0.478459 0.515990 0.462993 0.452838 0.361406 0.426232 0.411901 0.407750 1.000000 0.514838 0.446371 0.397543
IPC MEXICO 0.246910 0.047632 0.273321 0.220493 0.236461 0.176790 0.277335 0.122758 0.242381 0.184355 0.232621 0.089011 0.229045 0.288133 0.562971 0.627799 0.554650 0.541981 0.541424 0.508077 0.468303 0.499063 0.484588 0.479460 0.514838 1.000000 0.453085 0.308456
S&P/CLX IPSA 0.219204 0.055143 0.282815 0.227177 0.260783 0.179143 0.270282 0.118085 0.247958 0.124926 0.230815 0.073290 0.244813 0.264643 0.418295 0.471160 0.405847 0.451815 0.397378 0.436641 0.377736 0.411217 0.401572 0.394006 0.446371 0.453085 1.000000 0.240304
MERVAL 0.111275 0.077693 0.134600 0.080279 0.102816 0.070007 0.142198 0.072225 0.115926 0.129774 0.104893 0.079608 0.140675 0.164276 0.373523 0.386562 0.318447 0.359792 0.360899 0.273697 0.266660 0.281366 0.272603 0.280055 0.397543 0.308456 0.240304 1.000000
#Durbin Watson
from statsmodels.stats.stattools import durbin_watson
out = durbin_watson(res_world.resid)
print('Durbin Watson Test')
for col,val in zip(X_transform_data.columns,out):
print((col), ':', round(val,2))
Durbin Watson Test SET : 2.06 VNI : 1.98 STI Index : 2.07 FTSE Bursa Malaysia KLCI : 2.04 Composite Index : 2.02 PSEi INDEX : 2.04 HANG SENG INDEX : 2.08 Shenzhen Component : 2.01 KOSPI Composite Index : 2.1 Nikkei 225 : 2.05 ALL ORDINARIES : 2.13 S&P/NZX 50 INDEX GROSS ( GROSS : 2.0 TSEC weighted index : 2.07 NIFTY 50 : 2.04 Dow Jones Industrial Average : 2.0 NYSE COMPOSITE (DJ) : 2.0 Russell 2000 : 2.0 S&P/TSX Composite index : 2.01 NASDAQ Composite : 2.0 FTSE 100 : 2.05 DAX PERFORMANCE-INDEX : 2.02 CAC 40 : 2.02 ESTX 50 PR.EUR : 2.02 BEL 20 : 2.02 IBOVESPA : 2.0 IPC MEXICO : 2.0 S&P/CLX IPSA : 2.01 MERVAL : 1.99
y_fitted = res_world.fittedvalues
plt.figure(figsize = (15,5))
plt.plot(res_world.resid, label='resid')
plt.plot(y_fitted, label='VAR prediction')
plt.xlabel('Date')
plt.xticks(rotation=45)
plt.ylabel('Residuals')
plt.grid(True)
#ASEAN
X_transform_ASEAN = X_transform_data[['SET','VNI','STI Index','FTSE Bursa Malaysia KLCI','Composite Index','PSEi INDEX']]
#Lag Order Selection
model_ASEAN = VAR(endog = X_transform_ASEAN)
res_ASEAN = model_ASEAN.select_order(30)
print(res_ASEAN.summary())
mod_ASEAN = VAR(X_transform_ASEAN)
res_ASEAN = mod_ASEAN.fit(maxlags=30, ic='aic')
print(res_ASEAN.summary())
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
VAR Order Selection (* highlights the minimums)
==================================================
AIC BIC FPE HQIC
--------------------------------------------------
0 32.69 32.70* 1.568e+14 32.69
1 32.64 32.74 1.498e+14 32.68*
2 32.64 32.83 1.503e+14 32.71
3 32.63* 32.90 1.487e+14* 32.73
4 32.64 33.00 1.498e+14 32.77
5 32.65 33.09 1.513e+14 32.81
6 32.65 33.18 1.517e+14 32.85
7 32.66 33.28 1.535e+14 32.89
8 32.68 33.38 1.557e+14 32.93
9 32.69 33.48 1.580e+14 32.98
10 32.71 33.58 1.602e+14 33.02
11 32.72 33.68 1.624e+14 33.07
12 32.74 33.78 1.650e+14 33.12
13 32.74 33.87 1.663e+14 33.15
14 32.76 33.97 1.682e+14 33.20
15 32.76 34.06 1.697e+14 33.24
16 32.77 34.16 1.707e+14 33.27
17 32.79 34.26 1.739e+14 33.32
18 32.80 34.36 1.763e+14 33.37
19 32.81 34.45 1.777e+14 33.41
20 32.82 34.55 1.793e+14 33.45
21 32.84 34.65 1.821e+14 33.49
22 32.84 34.74 1.834e+14 33.53
23 32.86 34.84 1.861e+14 33.58
24 32.87 34.94 1.886e+14 33.62
25 32.88 35.04 1.915e+14 33.67
26 32.90 35.14 1.937e+14 33.71
27 32.91 35.23 1.956e+14 33.75
28 32.92 35.33 1.985e+14 33.80
29 32.94 35.43 2.015e+14 33.84
30 32.96 35.54 2.056e+14 33.89
--------------------------------------------------
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
Summary of Regression Results
==================================
Model: VAR
Method: OLS
Date: Thu, 06, May, 2021
Time: 18:31:25
--------------------------------------------------------------------
No. of Equations: 6.00000 BIC: 32.9084
Nobs: 2463.00 HQIC: 32.7372
Log likelihood: -61050.6 FPE: 1.49674e+14
AIC: 32.6395 Det(Omega_mle): 1.42930e+14
--------------------------------------------------------------------
Results for equation SET
==============================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------------------
const 0.393622 0.224475 1.754 0.080
L1.SET -0.009374 0.023998 -0.391 0.696
L1.VNI 0.077350 0.042477 1.821 0.069
L1.STI Index 0.005184 0.013327 0.389 0.697
L1.FTSE Bursa Malaysia KLCI -0.044271 0.034227 -1.293 0.196
L1.Composite Index 0.023454 0.007064 3.320 0.001
L1.PSEi INDEX -0.005745 0.004655 -1.234 0.217
L2.SET -0.039454 0.024132 -1.635 0.102
L2.VNI -0.015738 0.042844 -0.367 0.713
L2.STI Index 0.007644 0.013385 0.571 0.568
L2.FTSE Bursa Malaysia KLCI 0.005999 0.034341 0.175 0.861
L2.Composite Index 0.018217 0.007082 2.572 0.010
L2.PSEi INDEX -0.002307 0.004655 -0.496 0.620
L3.SET -0.011373 0.024071 -0.472 0.637
L3.VNI 0.036473 0.043419 0.840 0.401
L3.STI Index 0.005125 0.013384 0.383 0.702
L3.FTSE Bursa Malaysia KLCI -0.040886 0.034247 -1.194 0.233
L3.Composite Index 0.000662 0.007095 0.093 0.926
L3.PSEi INDEX 0.001415 0.004593 0.308 0.758
==============================================================================================
Results for equation VNI
==============================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------------------
const 0.170981 0.109750 1.558 0.119
L1.SET 0.005005 0.011733 0.427 0.670
L1.VNI 0.056701 0.020768 2.730 0.006
L1.STI Index 0.022459 0.006516 3.447 0.001
L1.FTSE Bursa Malaysia KLCI 0.009624 0.016734 0.575 0.565
L1.Composite Index -0.005479 0.003454 -1.586 0.113
L1.PSEi INDEX 0.002500 0.002276 1.099 0.272
L2.SET -0.006171 0.011799 -0.523 0.601
L2.VNI -0.003802 0.020947 -0.182 0.856
L2.STI Index -0.001328 0.006544 -0.203 0.839
L2.FTSE Bursa Malaysia KLCI 0.004328 0.016790 0.258 0.797
L2.Composite Index 0.011113 0.003463 3.209 0.001
L2.PSEi INDEX -0.005378 0.002276 -2.363 0.018
L3.SET 0.014325 0.011769 1.217 0.224
L3.VNI 0.049610 0.021229 2.337 0.019
L3.STI Index 0.014415 0.006543 2.203 0.028
L3.FTSE Bursa Malaysia KLCI -0.034416 0.016744 -2.055 0.040
L3.Composite Index 0.002284 0.003469 0.658 0.510
L3.PSEi INDEX -0.000791 0.002245 -0.352 0.725
==============================================================================================
Results for equation STI Index
==============================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------------------
const 0.101544 0.428507 0.237 0.813
L1.SET 0.119481 0.045811 2.608 0.009
L1.VNI 0.013705 0.081085 0.169 0.866
L1.STI Index 0.018743 0.025441 0.737 0.461
L1.FTSE Bursa Malaysia KLCI -0.117298 0.065336 -1.795 0.073
L1.Composite Index 0.011035 0.013486 0.818 0.413
L1.PSEi INDEX -0.001737 0.008886 -0.196 0.845
L2.SET 0.037904 0.046067 0.823 0.411
L2.VNI 0.032642 0.081786 0.399 0.690
L2.STI Index -0.026891 0.025551 -1.052 0.293
L2.FTSE Bursa Malaysia KLCI 0.147019 0.065554 2.243 0.025
L2.Composite Index 0.013649 0.013519 1.010 0.313
L2.PSEi INDEX -0.000677 0.008885 -0.076 0.939
L3.SET 0.027022 0.045950 0.588 0.556
L3.VNI -0.025819 0.082884 -0.312 0.755
L3.STI Index 0.018221 0.025548 0.713 0.476
L3.FTSE Bursa Malaysia KLCI -0.019693 0.065374 -0.301 0.763
L3.Composite Index -0.018838 0.013544 -1.391 0.164
L3.PSEi INDEX -0.001249 0.008767 -0.142 0.887
==============================================================================================
Results for equation FTSE Bursa Malaysia KLCI
==============================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------------------
const 0.209945 0.164686 1.275 0.202
L1.SET 0.043180 0.017606 2.453 0.014
L1.VNI -0.020964 0.031163 -0.673 0.501
L1.STI Index 0.026603 0.009778 2.721 0.007
L1.FTSE Bursa Malaysia KLCI 0.002419 0.025110 0.096 0.923
L1.Composite Index 0.009934 0.005183 1.917 0.055
L1.PSEi INDEX -0.005024 0.003415 -1.471 0.141
L2.SET -0.003682 0.017705 -0.208 0.835
L2.VNI -0.029826 0.031432 -0.949 0.343
L2.STI Index 0.014906 0.009820 1.518 0.129
L2.FTSE Bursa Malaysia KLCI 0.018697 0.025194 0.742 0.458
L2.Composite Index 0.007380 0.005196 1.420 0.155
L2.PSEi INDEX -0.004840 0.003415 -1.417 0.156
L3.SET -0.007431 0.017660 -0.421 0.674
L3.VNI -0.015059 0.031855 -0.473 0.636
L3.STI Index 0.010275 0.009819 1.046 0.295
L3.FTSE Bursa Malaysia KLCI -0.024257 0.025125 -0.965 0.334
L3.Composite Index 0.003229 0.005205 0.620 0.535
L3.PSEi INDEX -0.003820 0.003369 -1.134 0.257
==============================================================================================
Results for equation Composite Index
==============================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------------------
const 1.823350 0.818995 2.226 0.026
L1.SET 0.253528 0.087557 2.896 0.004
L1.VNI -0.241988 0.154976 -1.561 0.118
L1.STI Index 0.064958 0.048625 1.336 0.182
L1.FTSE Bursa Malaysia KLCI -0.216667 0.124875 -1.735 0.083
L1.Composite Index 0.023190 0.025775 0.900 0.368
L1.PSEi INDEX -0.025368 0.016983 -1.494 0.135
L2.SET 0.090916 0.088047 1.033 0.302
L2.VNI -0.163333 0.156316 -1.045 0.296
L2.STI Index 0.051765 0.048836 1.060 0.289
L2.FTSE Bursa Malaysia KLCI 0.095382 0.125292 0.761 0.446
L2.Composite Index -0.018196 0.025839 -0.704 0.481
L2.PSEi INDEX -0.011688 0.016982 -0.688 0.491
L3.SET 0.120738 0.087823 1.375 0.169
L3.VNI -0.137714 0.158415 -0.869 0.385
L3.STI Index 0.112503 0.048830 2.304 0.021
L3.FTSE Bursa Malaysia KLCI -0.281494 0.124949 -2.253 0.024
L3.Composite Index -0.089470 0.025887 -3.456 0.001
L3.PSEi INDEX -0.019699 0.016757 -1.176 0.240
==============================================================================================
Results for equation PSEi INDEX
==============================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------------------
const 2.048744 1.126858 1.818 0.069
L1.SET 0.622483 0.120470 5.167 0.000
L1.VNI -0.227881 0.213232 -1.069 0.285
L1.STI Index 0.304480 0.066903 4.551 0.000
L1.FTSE Bursa Malaysia KLCI -0.307975 0.171817 -1.792 0.073
L1.Composite Index 0.095649 0.035464 2.697 0.007
L1.PSEi INDEX -0.062969 0.023367 -2.695 0.007
L2.SET 0.174079 0.121144 1.437 0.151
L2.VNI -0.346538 0.215076 -1.611 0.107
L2.STI Index -0.016175 0.067193 -0.241 0.810
L2.FTSE Bursa Malaysia KLCI 0.142925 0.172390 0.829 0.407
L2.Composite Index 0.094051 0.035552 2.645 0.008
L2.PSEi INDEX -0.068237 0.023366 -2.920 0.003
L3.SET -0.009352 0.120836 -0.077 0.938
L3.VNI 0.007794 0.217964 0.036 0.971
L3.STI Index 0.109845 0.067185 1.635 0.102
L3.FTSE Bursa Malaysia KLCI -0.204474 0.171917 -1.189 0.234
L3.Composite Index 0.103208 0.035618 2.898 0.004
L3.PSEi INDEX -0.077167 0.023056 -3.347 0.001
==============================================================================================
Correlation matrix of residuals
SET VNI STI Index FTSE Bursa Malaysia KLCI Composite Index PSEi INDEX
SET 1.000000 0.122465 0.454669 0.368461 0.448056 0.334652
VNI 0.122465 1.000000 0.163617 0.175119 0.127261 0.150378
STI Index 0.454669 0.163617 1.000000 0.475551 0.491481 0.347622
FTSE Bursa Malaysia KLCI 0.368461 0.175119 0.475551 1.000000 0.486761 0.406534
Composite Index 0.448056 0.127261 0.491481 0.486761 1.000000 0.434169
PSEi INDEX 0.334652 0.150378 0.347622 0.406534 0.434169 1.000000
y_fitted = res_ASEAN.fittedvalues
plt.figure(figsize = (15,5))
plt.plot(res_ASEAN.resid, label='resid')
plt.plot(y_fitted, label='VAR prediction')
plt.xlabel('Date')
plt.xticks(rotation=45)
plt.ylabel('Residuals')
plt.grid(True)
#ASIA
X_transform_ASIA = X_transform_data[['SET','HANG SENG INDEX','Shenzhen Component','KOSPI Composite Index'
,'Nikkei 225','TSEC weighted index','NIFTY 50','ALL ORDINARIES','S&P/NZX 50 INDEX GROSS ( GROSS ']]
#Lag Order Selection
model_ASIA = VAR(endog = X_transform_ASIA)
res_ASIA = model_ASIA.select_order(30)
print(res_ASIA.summary())
mod_ASIA = VAR(X_transform_ASIA)
res_ASIA = mod_ASIA.fit(maxlags=30, ic='aic')
print(res_ASIA.summary())
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
VAR Order Selection (* highlights the minimums)
==================================================
AIC BIC FPE HQIC
--------------------------------------------------
0 69.24 69.26* 1.176e+30 69.25*
1 69.18* 69.39 1.108e+30* 69.26
2 69.20 69.61 1.135e+30 69.35
3 69.24 69.84 1.180e+30 69.46
4 69.26 70.05 1.201e+30 69.55
5 69.29 70.28 1.240e+30 69.65
6 69.32 70.50 1.273e+30 69.75
7 69.33 70.70 1.282e+30 69.82
8 69.35 70.91 1.311e+30 69.92
9 69.39 71.14 1.362e+30 70.02
10 69.42 71.37 1.404e+30 70.13
11 69.45 71.59 1.451e+30 70.23
12 69.48 71.82 1.501e+30 70.33
13 69.51 72.04 1.538e+30 70.43
14 69.53 72.25 1.568e+30 70.52
15 69.56 72.47 1.624e+30 70.62
16 69.59 72.70 1.677e+30 70.72
17 69.63 72.93 1.738e+30 70.83
18 69.66 73.16 1.800e+30 70.93
19 69.69 73.37 1.842e+30 71.03
20 69.70 73.58 1.876e+30 71.11
21 69.72 73.79 1.910e+30 71.20
22 69.74 74.01 1.956e+30 71.29
23 69.77 74.23 2.006e+30 71.39
24 69.80 74.44 2.059e+30 71.49
25 69.83 74.68 2.142e+30 71.59
26 69.87 74.90 2.217e+30 71.70
27 69.90 75.13 2.295e+30 71.80
28 69.93 75.34 2.350e+30 71.90
29 69.94 75.55 2.377e+30 71.98
30 69.97 75.77 2.456e+30 72.08
--------------------------------------------------
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
Summary of Regression Results
==================================
Model: VAR
Method: OLS
Date: Thu, 06, May, 2021
Time: 18:31:57
--------------------------------------------------------------------
No. of Equations: 9.00000 BIC: 69.3972
Nobs: 2465.00 HQIC: 69.2621
Log likelihood: -116660. FPE: 1.11350e+30
AIC: 69.1851 Det(Omega_mle): 1.07366e+30
--------------------------------------------------------------------
Results for equation SET
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.405197 0.223560 1.812 0.070
L1.SET 0.007948 0.023164 0.343 0.732
L1.HANG SENG INDEX 0.000212 0.001520 0.139 0.889
L1.Shenzhen Component -0.003685 0.001513 -2.435 0.015
L1.KOSPI Composite Index 0.031269 0.019650 1.591 0.112
L1.Nikkei 225 -0.005116 0.001554 -3.293 0.001
L1.TSEC weighted index -0.002835 0.004600 -0.616 0.538
L1.NIFTY 50 0.012042 0.004440 2.712 0.007
L1.ALL ORDINARIES 0.005740 0.008051 0.713 0.476
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.000370 0.009751 0.038 0.970
=====================================================================================================
Results for equation HANG SENG INDEX
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 2.148060 4.536545 0.474 0.636
L1.SET 1.060728 0.470050 2.257 0.024
L1.HANG SENG INDEX -0.041488 0.030850 -1.345 0.179
L1.Shenzhen Component -0.049152 0.030702 -1.601 0.109
L1.KOSPI Composite Index 0.228562 0.398737 0.573 0.566
L1.Nikkei 225 -0.035900 0.031529 -1.139 0.255
L1.TSEC weighted index -0.120571 0.093349 -1.292 0.196
L1.NIFTY 50 0.430481 0.090108 4.777 0.000
L1.ALL ORDINARIES 0.196468 0.163377 1.203 0.229
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.029754 0.197874 -0.150 0.880
=====================================================================================================
Results for equation Shenzhen Component
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const -1.422674 3.336114 -0.426 0.670
L1.SET 0.108942 0.345669 0.315 0.753
L1.HANG SENG INDEX 0.020542 0.022687 0.905 0.365
L1.Shenzhen Component 0.015056 0.022578 0.667 0.505
L1.KOSPI Composite Index 0.097779 0.293226 0.333 0.739
L1.Nikkei 225 0.034856 0.023186 1.503 0.133
L1.TSEC weighted index -0.074616 0.068647 -1.087 0.277
L1.NIFTY 50 0.046945 0.066264 0.708 0.479
L1.ALL ORDINARIES -0.141525 0.120145 -1.178 0.239
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.080441 0.145514 -0.553 0.580
=====================================================================================================
Results for equation KOSPI Composite Index
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.175946 0.327714 0.537 0.591
L1.SET 0.102708 0.033956 3.025 0.002
L1.HANG SENG INDEX 0.005186 0.002229 2.327 0.020
L1.Shenzhen Component -0.007495 0.002218 -3.379 0.001
L1.KOSPI Composite Index -0.092861 0.028804 -3.224 0.001
L1.Nikkei 225 -0.006635 0.002278 -2.913 0.004
L1.TSEC weighted index 0.008564 0.006743 1.270 0.204
L1.NIFTY 50 0.032216 0.006509 4.949 0.000
L1.ALL ORDINARIES 0.015287 0.011802 1.295 0.195
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.006635 0.014294 0.464 0.643
=====================================================================================================
Results for equation Nikkei 225
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 3.536974 3.513546 1.007 0.314
L1.SET 0.913966 0.364053 2.511 0.012
L1.HANG SENG INDEX -0.001551 0.023893 -0.065 0.948
L1.Shenzhen Component -0.006677 0.023779 -0.281 0.779
L1.KOSPI Composite Index -0.247840 0.308821 -0.803 0.422
L1.Nikkei 225 -0.111879 0.024419 -4.582 0.000
L1.TSEC weighted index -0.035315 0.072298 -0.488 0.625
L1.NIFTY 50 0.421401 0.069788 6.038 0.000
L1.ALL ORDINARIES 0.276661 0.126535 2.186 0.029
L1.S&P/NZX 50 INDEX GROSS ( GROSS 0.051101 0.153253 0.333 0.739
=====================================================================================================
Results for equation TSEC weighted index
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.604963 1.382067 0.438 0.662
L1.SET 0.320326 0.143202 2.237 0.025
L1.HANG SENG INDEX 0.018918 0.009399 2.013 0.044
L1.Shenzhen Component -0.018249 0.009354 -1.951 0.051
L1.KOSPI Composite Index 0.060581 0.121476 0.499 0.618
L1.Nikkei 225 -0.026834 0.009605 -2.794 0.005
L1.TSEC weighted index -0.047139 0.028439 -1.658 0.097
L1.NIFTY 50 0.140203 0.027452 5.107 0.000
L1.ALL ORDINARIES 0.083490 0.049773 1.677 0.093
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.037204 0.060283 -0.617 0.537
=====================================================================================================
Results for equation NIFTY 50
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 2.058776 1.193524 1.725 0.085
L1.SET 0.013071 0.123666 0.106 0.916
L1.HANG SENG INDEX 0.011300 0.008116 1.392 0.164
L1.Shenzhen Component -0.023661 0.008078 -2.929 0.003
L1.KOSPI Composite Index 0.128390 0.104904 1.224 0.221
L1.Nikkei 225 -0.009005 0.008295 -1.086 0.278
L1.TSEC weighted index 0.038565 0.024559 1.570 0.116
L1.NIFTY 50 0.016076 0.023707 0.678 0.498
L1.ALL ORDINARIES -0.010175 0.042983 -0.237 0.813
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.044100 0.052059 -0.847 0.397
=====================================================================================================
Results for equation ALL ORDINARIES
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 0.272081 0.779054 0.349 0.727
L1.SET 0.210241 0.080721 2.605 0.009
L1.HANG SENG INDEX 0.000294 0.005298 0.055 0.956
L1.Shenzhen Component -0.006947 0.005272 -1.318 0.188
L1.KOSPI Composite Index -0.057658 0.068474 -0.842 0.400
L1.Nikkei 225 -0.005546 0.005414 -1.024 0.306
L1.TSEC weighted index -0.022047 0.016031 -1.375 0.169
L1.NIFTY 50 0.106002 0.015474 6.850 0.000
L1.ALL ORDINARIES -0.008525 0.028056 -0.304 0.761
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.054219 0.033981 -1.596 0.111
=====================================================================================================
Results for equation S&P/NZX 50 INDEX GROSS ( GROSS
=====================================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------------------
const 1.908471 0.519589 3.673 0.000
L1.SET 0.045853 0.053837 0.852 0.394
L1.HANG SENG INDEX 0.000791 0.003533 0.224 0.823
L1.Shenzhen Component 0.002065 0.003516 0.587 0.557
L1.KOSPI Composite Index -0.041316 0.045669 -0.905 0.366
L1.Nikkei 225 -0.002247 0.003611 -0.622 0.534
L1.TSEC weighted index 0.010128 0.010692 0.947 0.343
L1.NIFTY 50 0.047604 0.010320 4.613 0.000
L1.ALL ORDINARIES 0.052289 0.018712 2.794 0.005
L1.S&P/NZX 50 INDEX GROSS ( GROSS -0.019578 0.022663 -0.864 0.388
=====================================================================================================
Correlation matrix of residuals
SET HANG SENG INDEX Shenzhen Component KOSPI Composite Index Nikkei 225 TSEC weighted index NIFTY 50 ALL ORDINARIES S&P/NZX 50 INDEX GROSS ( GROSS
SET 1.000000 0.428393 0.188838 0.352093 0.267006 0.346386 0.391961 0.318317 0.193057
HANG SENG INDEX 0.428393 1.000000 0.449699 0.586647 0.452941 0.577646 0.467007 0.555486 0.271180
Shenzhen Component 0.188838 0.449699 1.000000 0.242653 0.206872 0.282063 0.184358 0.232658 0.093193
KOSPI Composite Index 0.352093 0.586647 0.242653 1.000000 0.432472 0.634050 0.380694 0.544058 0.263592
Nikkei 225 0.267006 0.452941 0.206872 0.432472 1.000000 0.431251 0.314958 0.489691 0.327445
TSEC weighted index 0.346386 0.577646 0.282063 0.634050 0.431251 1.000000 0.362378 0.525190 0.285683
NIFTY 50 0.391961 0.467007 0.184358 0.380694 0.314958 0.362378 1.000000 0.338021 0.215104
ALL ORDINARIES 0.318317 0.555486 0.232658 0.544058 0.489691 0.525190 0.338021 1.000000 0.444370
S&P/NZX 50 INDEX GROSS ( GROSS 0.193057 0.271180 0.093193 0.263592 0.327445 0.285683 0.215104 0.444370 1.000000
y_fitted = res_ASIA.fittedvalues
plt.figure(figsize = (15,5))
plt.plot(res_ASIA.resid, label='resid')
plt.plot(y_fitted, label='VAR prediction')
plt.xlabel('Date')
plt.xticks(rotation=45)
plt.ylabel('Residuals')
plt.grid(True)
#Europe
X_transform_EU = X_transform_data[['SET','FTSE 100','DAX PERFORMANCE-INDEX','CAC 40','ESTX 50 PR.EUR','BEL 20']]
#Lag Order Selection
model_EU = VAR(endog = X_transform_EU)
res_EU = model_EU.select_order(30)
print(res_EU.summary())
mod_EU = VAR(X_transform_EU)
res_EU = mod_EU.fit(maxlags=30, ic='aic')
print(res_EU.summary())
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
VAR Order Selection (* highlights the minimums)
==================================================
AIC BIC FPE HQIC
--------------------------------------------------
0 35.32 35.34 2.187e+15 35.33
1 35.21* 35.31* 1.959e+15* 35.25*
2 35.22 35.41 1.979e+15 35.29
3 35.24 35.51 2.009e+15 35.33
4 35.25 35.60 2.031e+15 35.38
5 35.26 35.70 2.053e+15 35.42
6 35.26 35.79 2.062e+15 35.45
7 35.26 35.88 2.067e+15 35.49
8 35.28 35.98 2.098e+15 35.53
9 35.29 36.08 2.128e+15 35.58
10 35.31 36.18 2.162e+15 35.63
11 35.32 36.28 2.194e+15 35.67
12 35.34 36.38 2.227e+15 35.72
13 35.35 36.48 2.248e+15 35.76
14 35.36 36.57 2.272e+15 35.80
15 35.37 36.67 2.298e+15 35.84
16 35.38 36.77 2.329e+15 35.89
17 35.40 36.87 2.364e+15 35.93
18 35.41 36.97 2.389e+15 35.98
19 35.42 37.06 2.421e+15 36.02
20 35.44 37.16 2.453e+15 36.06
21 35.45 37.26 2.480e+15 36.11
22 35.46 37.36 2.512e+15 36.15
23 35.47 37.45 2.529e+15 36.19
24 35.48 37.55 2.573e+15 36.24
25 35.50 37.66 2.615e+15 36.28
26 35.51 37.76 2.655e+15 36.33
27 35.53 37.86 2.694e+15 36.38
28 35.54 37.95 2.729e+15 36.42
29 35.56 38.06 2.782e+15 36.47
30 35.58 38.16 2.826e+15 36.52
--------------------------------------------------
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
Summary of Regression Results
==================================
Model: VAR
Method: OLS
Date: Thu, 06, May, 2021
Time: 18:32:27
--------------------------------------------------------------------
No. of Equations: 6.00000 BIC: 35.3036
Nobs: 2465.00 HQIC: 35.2405
Log likelihood: -64333.7 FPE: 1.94603e+15
AIC: 35.2046 Det(Omega_mle): 1.91320e+15
--------------------------------------------------------------------
Results for equation SET
===========================================================================================
coefficient std. error t-stat prob
-------------------------------------------------------------------------------------------
const 0.431743 0.222288 1.942 0.052
L1.SET -0.021762 0.021294 -1.022 0.307
L1.FTSE 100 0.027578 0.008346 3.304 0.001
L1.DAX PERFORMANCE-INDEX -0.005707 0.006147 -0.929 0.353
L1.CAC 40 0.038280 0.020772 1.843 0.065
L1.ESTX 50 PR.EUR -0.017173 0.026679 -0.644 0.520
L1.BEL 20 -0.025846 0.020619 -1.253 0.210
===========================================================================================
Results for equation FTSE 100
===========================================================================================
coefficient std. error t-stat prob
-------------------------------------------------------------------------------------------
const 0.785979 1.061978 0.740 0.459
L1.SET -0.174196 0.101730 -1.712 0.087
L1.FTSE 100 0.035219 0.039871 0.883 0.377
L1.DAX PERFORMANCE-INDEX -0.004064 0.029367 -0.138 0.890
L1.CAC 40 0.080016 0.099238 0.806 0.420
L1.ESTX 50 PR.EUR -0.068428 0.127459 -0.537 0.591
L1.BEL 20 -0.071000 0.098509 -0.721 0.471
===========================================================================================
Results for equation DAX PERFORMANCE-INDEX
===========================================================================================
coefficient std. error t-stat prob
-------------------------------------------------------------------------------------------
const 2.763091 1.939789 1.424 0.154
L1.SET -0.196041 0.185818 -1.055 0.291
L1.FTSE 100 -0.000663 0.072828 -0.009 0.993
L1.DAX PERFORMANCE-INDEX -0.019474 0.053641 -0.363 0.717
L1.CAC 40 0.118048 0.181266 0.651 0.515
L1.ESTX 50 PR.EUR -0.059114 0.232814 -0.254 0.800
L1.BEL 20 -0.025490 0.179934 -0.142 0.887
===========================================================================================
Results for equation CAC 40
===========================================================================================
coefficient std. error t-stat prob
-------------------------------------------------------------------------------------------
const 0.609525 0.936012 0.651 0.515
L1.SET -0.162248 0.089663 -1.810 0.070
L1.FTSE 100 0.019591 0.035142 0.557 0.577
L1.DAX PERFORMANCE-INDEX -0.018805 0.025884 -0.727 0.468
L1.CAC 40 0.027370 0.087467 0.313 0.754
L1.ESTX 50 PR.EUR 0.010583 0.112340 0.094 0.925
L1.BEL 20 -0.027301 0.086824 -0.314 0.753
===========================================================================================
Results for equation ESTX 50 PR.EUR
===========================================================================================
coefficient std. error t-stat prob
-------------------------------------------------------------------------------------------
const 0.139525 0.682770 0.204 0.838
L1.SET -0.124088 0.065405 -1.897 0.058
L1.FTSE 100 0.001911 0.025634 0.075 0.941
L1.DAX PERFORMANCE-INDEX 0.019272 0.018881 1.021 0.307
L1.CAC 40 0.183824 0.063802 2.881 0.004
L1.ESTX 50 PR.EUR -0.315767 0.081946 -3.853 0.000
L1.BEL 20 0.008979 0.063334 0.142 0.887
===========================================================================================
Results for equation BEL 20
===========================================================================================
coefficient std. error t-stat prob
-------------------------------------------------------------------------------------------
const 0.623694 0.576702 1.081 0.279
L1.SET -0.136869 0.055244 -2.478 0.013
L1.FTSE 100 -0.003010 0.021652 -0.139 0.889
L1.DAX PERFORMANCE-INDEX -0.003226 0.015948 -0.202 0.840
L1.CAC 40 0.086913 0.053891 1.613 0.107
L1.ESTX 50 PR.EUR -0.058331 0.069216 -0.843 0.399
L1.BEL 20 -0.030828 0.053495 -0.576 0.564
===========================================================================================
Correlation matrix of residuals
SET FTSE 100 DAX PERFORMANCE-INDEX CAC 40 ESTX 50 PR.EUR BEL 20
SET 1.000000 0.328552 0.308202 0.314491 0.297562 0.314647
FTSE 100 0.328552 1.000000 0.798139 0.854632 0.832032 0.824372
DAX PERFORMANCE-INDEX 0.308202 0.798139 1.000000 0.914757 0.919802 0.875283
CAC 40 0.314491 0.854632 0.914757 1.000000 0.967697 0.917131
ESTX 50 PR.EUR 0.297562 0.832032 0.919802 0.967697 1.000000 0.909669
BEL 20 0.314647 0.824372 0.875283 0.917131 0.909669 1.000000
y_fitted = res_EU.fittedvalues
plt.figure(figsize = (15,5))
plt.plot(res_EU.resid, label='resid')
plt.plot(y_fitted, label='VAR prediction')
plt.xlabel('Date')
plt.xticks(rotation=45)
plt.ylabel('Residuals')
plt.grid(True)
#North America
X_transform_NA = X_transform_data[['SET','Dow Jones Industrial Average','NYSE COMPOSITE (DJ)','Russell 2000'
,'S&P/TSX Composite index','NASDAQ Composite','IPC MEXICO']]
#Lag Order Selection
model_NA = VAR(endog = X_transform_NA)
res_NA = model_NA.select_order(30)
print(res_NA.summary())
mod_NA = VAR(X_transform_NA)
res_NA = mod_NA.fit(maxlags=30, ic='aic')
print(res_NA.summary())
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
VAR Order Selection (* highlights the minimums)
==================================================
AIC BIC FPE HQIC
--------------------------------------------------
0 48.33 48.35* 9.779e+20 48.34
1 48.25* 48.38 9.010e+20* 48.30*
2 48.26 48.51 9.141e+20 48.36
3 48.27 48.64 9.229e+20 48.41
4 48.30 48.78 9.443e+20 48.47
5 48.32 48.92 9.641e+20 48.54
6 48.34 49.06 9.874e+20 48.60
7 48.35 49.19 9.988e+20 48.66
8 48.37 49.31 1.011e+21 48.71
9 48.38 49.45 1.027e+21 48.77
10 48.40 49.58 1.046e+21 48.83
11 48.42 49.72 1.068e+21 48.89
12 48.44 49.85 1.086e+21 48.95
13 48.45 49.98 1.101e+21 49.01
14 48.47 50.12 1.127e+21 49.07
15 48.49 50.26 1.148e+21 49.13
16 48.52 50.40 1.176e+21 49.20
17 48.54 50.54 1.205e+21 49.27
18 48.55 50.67 1.223e+21 49.32
19 48.58 50.81 1.251e+21 49.39
20 48.59 50.94 1.272e+21 49.45
21 48.61 51.07 1.288e+21 49.50
22 48.62 51.20 1.309e+21 49.56
23 48.64 51.34 1.336e+21 49.62
24 48.66 51.48 1.365e+21 49.69
25 48.68 51.62 1.391e+21 49.75
26 48.70 51.75 1.415e+21 49.81
27 48.72 51.88 1.441e+21 49.87
28 48.74 52.02 1.468e+21 49.93
29 48.75 52.15 1.488e+21 49.98
30 48.77 52.28 1.516e+21 50.05
--------------------------------------------------
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
Summary of Regression Results
==================================
Model: VAR
Method: OLS
Date: Thu, 06, May, 2021
Time: 18:33:03
--------------------------------------------------------------------
No. of Equations: 7.00000 BIC: 48.3661
Nobs: 2465.00 HQIC: 48.2821
Log likelihood: -83876.3 FPE: 8.86753e+20
AIC: 48.2341 Det(Omega_mle): 8.66866e+20
--------------------------------------------------------------------
Results for equation SET
==================================================================================================
coefficient std. error t-stat prob
--------------------------------------------------------------------------------------------------
const 0.396345 0.218113 1.817 0.069
L1.SET -0.044364 0.020468 -2.167 0.030
L1.Dow Jones Industrial Average -0.006860 0.006282 -1.092 0.275
L1.NYSE COMPOSITE (DJ) 0.040381 0.012214 3.306 0.001
L1.Russell 2000 -0.094122 0.052397 -1.796 0.072
L1.S&P/TSX Composite index 0.011016 0.003937 2.798 0.005
L1.NASDAQ Composite 0.007891 0.015138 0.521 0.602
L1.IPC MEXICO 0.000473 0.000870 0.544 0.587
==================================================================================================
Results for equation Dow Jones Industrial Average
==================================================================================================
coefficient std. error t-stat prob
--------------------------------------------------------------------------------------------------
const 6.252034 2.344661 2.666 0.008
L1.SET -0.029939 0.220029 -0.136 0.892
L1.Dow Jones Industrial Average -0.022532 0.067531 -0.334 0.739
L1.NYSE COMPOSITE (DJ) -0.068445 0.131303 -0.521 0.602
L1.Russell 2000 -0.150917 0.563254 -0.268 0.789
L1.S&P/TSX Composite index 0.084356 0.042317 1.993 0.046
L1.NASDAQ Composite -0.141878 0.162730 -0.872 0.383
L1.IPC MEXICO 0.009269 0.009352 0.991 0.322
==================================================================================================
Results for equation NYSE COMPOSITE (DJ)
==================================================================================================
coefficient std. error t-stat prob
--------------------------------------------------------------------------------------------------
const 2.436915 1.553172 1.569 0.117
L1.SET -0.211460 0.145754 -1.451 0.147
L1.Dow Jones Industrial Average -0.033399 0.044734 -0.747 0.455
L1.NYSE COMPOSITE (DJ) -0.009723 0.086979 -0.112 0.911
L1.Russell 2000 -0.283897 0.373116 -0.761 0.447
L1.S&P/TSX Composite index 0.038906 0.028032 1.388 0.165
L1.NASDAQ Composite 0.021450 0.107797 0.199 0.842
L1.IPC MEXICO 0.005251 0.006195 0.848 0.397
==================================================================================================
Results for equation Russell 2000
==================================================================================================
coefficient std. error t-stat prob
--------------------------------------------------------------------------------------------------
const 0.396652 0.214199 1.852 0.064
L1.SET -0.023895 0.020101 -1.189 0.235
L1.Dow Jones Industrial Average -0.005353 0.006169 -0.868 0.386
L1.NYSE COMPOSITE (DJ) 0.009687 0.011995 0.808 0.419
L1.Russell 2000 -0.076682 0.051457 -1.490 0.136
L1.S&P/TSX Composite index 0.001392 0.003866 0.360 0.719
L1.NASDAQ Composite 0.001439 0.014866 0.097 0.923
L1.IPC MEXICO -0.000249 0.000854 -0.291 0.771
==================================================================================================
Results for equation S&P/TSX Composite index
==================================================================================================
coefficient std. error t-stat prob
--------------------------------------------------------------------------------------------------
const 1.646660 1.883729 0.874 0.382
L1.SET -0.429583 0.176774 -2.430 0.015
L1.Dow Jones Industrial Average -0.094349 0.054255 -1.739 0.082
L1.NYSE COMPOSITE (DJ) 0.197747 0.105490 1.875 0.061
L1.Russell 2000 -0.384770 0.452525 -0.850 0.395
L1.S&P/TSX Composite index 0.033656 0.033998 0.990 0.322
L1.NASDAQ Composite 0.051200 0.130739 0.392 0.695
L1.IPC MEXICO 0.005279 0.007514 0.703 0.482
==================================================================================================
Results for equation NASDAQ Composite
==================================================================================================
coefficient std. error t-stat prob
--------------------------------------------------------------------------------------------------
const 2.105392 0.724434 2.906 0.004
L1.SET -0.048758 0.067983 -0.717 0.473
L1.Dow Jones Industrial Average -0.036426 0.020865 -1.746 0.081
L1.NYSE COMPOSITE (DJ) 0.046555 0.040569 1.148 0.251
L1.Russell 2000 -0.318833 0.174030 -1.832 0.067
L1.S&P/TSX Composite index 0.017602 0.013075 1.346 0.178
L1.NASDAQ Composite 0.004072 0.050279 0.081 0.935
L1.IPC MEXICO 0.004228 0.002890 1.463 0.143
==================================================================================================
Results for equation IPC MEXICO
==================================================================================================
coefficient std. error t-stat prob
--------------------------------------------------------------------------------------------------
const 6.763816 6.567381 1.030 0.303
L1.SET -0.536251 0.616301 -0.870 0.384
L1.Dow Jones Industrial Average -0.287783 0.189154 -1.521 0.128
L1.NYSE COMPOSITE (DJ) 0.510150 0.367778 1.387 0.165
L1.Russell 2000 -2.172241 1.577670 -1.377 0.169
L1.S&P/TSX Composite index 0.147598 0.118530 1.245 0.213
L1.NASDAQ Composite 0.530407 0.455806 1.164 0.245
L1.IPC MEXICO 0.018971 0.026196 0.724 0.469
==================================================================================================
Correlation matrix of residuals
SET Dow Jones Industrial Average NYSE COMPOSITE (DJ) Russell 2000 S&P/TSX Composite index NASDAQ Composite IPC MEXICO
SET 1.000000 0.203571 0.237370 0.187666 0.225333 0.198247 0.249505
Dow Jones Industrial Average 0.203571 1.000000 0.943337 0.834198 0.698446 0.871403 0.562190
NYSE COMPOSITE (DJ) 0.237370 0.943337 1.000000 0.888892 0.792644 0.870505 0.624600
Russell 2000 0.187666 0.834198 0.888892 1.000000 0.698562 0.882153 0.551154
S&P/TSX Composite index 0.225333 0.698446 0.792644 0.698562 1.000000 0.673635 0.538649
NASDAQ Composite 0.198247 0.871403 0.870505 0.882153 0.673635 1.000000 0.538072
IPC MEXICO 0.249505 0.562190 0.624600 0.551154 0.538649 0.538072 1.000000
y_fitted = res_NA.fittedvalues
plt.figure(figsize = (15,5))
plt.plot(res_NA.resid, label='resid')
plt.plot(y_fitted, label='VAR prediction')
plt.xlabel('Date')
plt.xticks(rotation=45)
plt.ylabel('Residuals')
plt.grid(True)
#South America
X_transform_SA = X_transform_data[['SET','IBOVESPA','S&P/CLX IPSA','MERVAL']]
#Lag Order Selection
model_SA = VAR(endog = X_transform_SA)
res_SA = model_SA.select_order(30)
print(res_SA.summary())
mod_SA = VAR(X_transform_SA)
res_SA = mod_SA.fit(maxlags=30, ic='aic')
print(res_SA.summary())
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
VAR Order Selection (* highlights the minimums)
==================================================
AIC BIC FPE HQIC
--------------------------------------------------
0 34.99 35.00 1.564e+15 34.99
1 34.92 34.97* 1.464e+15 34.94*
2 34.92 35.00 1.461e+15 34.95
3 34.91* 35.03 1.446e+15* 34.95
4 34.92 35.08 1.457e+15 34.97
5 34.92 35.12 1.461e+15 34.99
6 34.92 35.16 1.467e+15 35.01
7 34.92 35.20 1.469e+15 35.02
8 34.93 35.24 1.473e+15 35.04
9 34.93 35.28 1.477e+15 35.06
10 34.93 35.32 1.482e+15 35.07
11 34.94 35.37 1.492e+15 35.09
12 34.95 35.42 1.508e+15 35.12
13 34.95 35.46 1.510e+15 35.13
14 34.96 35.50 1.519e+15 35.15
15 34.96 35.54 1.528e+15 35.17
16 34.97 35.59 1.539e+15 35.19
17 34.98 35.63 1.550e+15 35.22
18 34.98 35.67 1.554e+15 35.23
19 34.98 35.71 1.557e+15 35.25
20 34.98 35.75 1.557e+15 35.26
21 34.99 35.80 1.571e+15 35.28
22 35.00 35.84 1.582e+15 35.31
23 34.99 35.88 1.575e+15 35.31
24 35.00 35.92 1.585e+15 35.33
25 35.00 35.97 1.593e+15 35.35
26 35.01 36.01 1.604e+15 35.37
27 35.01 36.05 1.609e+15 35.39
28 35.01 36.09 1.609e+15 35.41
29 35.02 36.14 1.623e+15 35.43
30 35.03 36.18 1.633e+15 35.45
--------------------------------------------------
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
Summary of Regression Results
==================================
Model: VAR
Method: OLS
Date: Thu, 06, May, 2021
Time: 18:33:16
--------------------------------------------------------------------
No. of Equations: 4.00000 BIC: 35.0186
Nobs: 2463.00 HQIC: 34.9405
Log likelihood: -56901.7 FPE: 1.42925e+15
AIC: 34.8959 Det(Omega_mle): 1.39947e+15
--------------------------------------------------------------------
Results for equation SET
==================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------
const 0.358024 0.219477 1.631 0.103
L1.SET -0.053586 0.020848 -2.570 0.010
L1.IBOVESPA 0.002269 0.000353 6.432 0.000
L1.S&P/CLX IPSA 0.028990 0.007610 3.809 0.000
L1.MERVAL 0.002783 0.001299 2.143 0.032
L2.SET -0.038009 0.020801 -1.827 0.068
L2.IBOVESPA 0.000423 0.000358 1.182 0.237
L2.S&P/CLX IPSA 0.020269 0.007650 2.650 0.008
L2.MERVAL 0.000653 0.001298 0.503 0.615
L3.SET -0.026746 0.020436 -1.309 0.191
L3.IBOVESPA 0.000437 0.000356 1.227 0.220
L3.S&P/CLX IPSA 0.006980 0.007592 0.919 0.358
L3.MERVAL 0.001218 0.001315 0.926 0.355
==================================================================================
Results for equation IBOVESPA
==================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------
const 3.471087 14.949442 0.232 0.816
L1.SET -0.740247 1.420048 -0.521 0.602
L1.IBOVESPA -0.034736 0.024032 -1.445 0.148
L1.S&P/CLX IPSA 0.238356 0.518345 0.460 0.646
L1.MERVAL 0.117308 0.088476 1.326 0.185
L2.SET 1.538007 1.416836 1.086 0.278
L2.IBOVESPA 0.006383 0.024381 0.262 0.793
L2.S&P/CLX IPSA -0.045080 0.521059 -0.087 0.931
L2.MERVAL -0.008401 0.088445 -0.095 0.924
L3.SET 1.216773 1.391999 0.874 0.382
L3.IBOVESPA -0.016909 0.024245 -0.697 0.486
L3.S&P/CLX IPSA -0.588958 0.517139 -1.139 0.255
L3.MERVAL -0.003729 0.089596 -0.042 0.967
==================================================================================
Results for equation S&P/CLX IPSA
==================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------
const 0.710797 0.662738 1.073 0.283
L1.SET -0.052614 0.062954 -0.836 0.403
L1.IBOVESPA 0.004545 0.001065 4.266 0.000
L1.S&P/CLX IPSA 0.090747 0.022979 3.949 0.000
L1.MERVAL 0.005560 0.003922 1.418 0.156
L2.SET 0.033921 0.062811 0.540 0.589
L2.IBOVESPA 0.001337 0.001081 1.237 0.216
L2.S&P/CLX IPSA -0.033034 0.023100 -1.430 0.153
L2.MERVAL -0.001212 0.003921 -0.309 0.757
L3.SET -0.052105 0.061710 -0.844 0.398
L3.IBOVESPA 0.000381 0.001075 0.354 0.723
L3.S&P/CLX IPSA -0.059629 0.022926 -2.601 0.009
L3.MERVAL 0.006635 0.003972 1.670 0.095
==================================================================================
Results for equation MERVAL
==================================================================================
coefficient std. error t-stat prob
----------------------------------------------------------------------------------
const 10.524319 3.718745 2.830 0.005
L1.SET -0.257250 0.353244 -0.728 0.466
L1.IBOVESPA -0.000205 0.005978 -0.034 0.973
L1.S&P/CLX IPSA 0.056483 0.128941 0.438 0.661
L1.MERVAL 0.053278 0.022009 2.421 0.015
L2.SET 0.304418 0.352445 0.864 0.388
L2.IBOVESPA 0.000795 0.006065 0.131 0.896
L2.S&P/CLX IPSA 0.021372 0.129616 0.165 0.869
L2.MERVAL -0.071875 0.022001 -3.267 0.001
L3.SET 0.381482 0.346267 1.102 0.271
L3.IBOVESPA -0.003351 0.006031 -0.556 0.578
L3.S&P/CLX IPSA -0.073234 0.128641 -0.569 0.569
L3.MERVAL 0.112083 0.022287 5.029 0.000
==================================================================================
Correlation matrix of residuals
SET IBOVESPA S&P/CLX IPSA MERVAL
SET 1.000000 0.174053 0.239244 0.112955
IBOVESPA 0.174053 1.000000 0.446446 0.404384
S&P/CLX IPSA 0.239244 0.446446 1.000000 0.240300
MERVAL 0.112955 0.404384 0.240300 1.000000
y_fitted = res_SA.fittedvalues
plt.figure(figsize = (15,5))
plt.plot(res_SA.resid, label='resid')
plt.plot(y_fitted, label='VAR prediction')
plt.xlabel('Date')
plt.xticks(rotation=45)
plt.ylabel('Residuals')
plt.grid(True)
#Try only t-test <-2 and >2
X_transform_select = X_transform_data[['SET','STI Index','Composite Index','Shenzhen Component','Nikkei 225','NYSE COMPOSITE (DJ)','IBOVESPA','S&P/CLX IPSA']]
X_transform_select
#Lag Order Selection
model_select = VAR(endog = X_transform_select)
res_select = model_select.select_order(30)
res_select.summary()
#Model
mod_select = VAR(X_transform_select)
res_select = mod_select.fit(maxlags=30, ic='aic')
print(res_select.summary())
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
C:\Users\Anawat\Anaconda3\envs\P and R\lib\site-packages\statsmodels\tsa\base\tsa_model.py:581: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting.
warnings.warn('A date index has been provided, but it has no'
Summary of Regression Results
==================================
Model: VAR
Method: OLS
Date: Thu, 06, May, 2021
Time: 18:33:49
--------------------------------------------------------------------
No. of Equations: 8.00000 BIC: 65.9228
Nobs: 2464.00 HQIC: 65.7187
Log likelihood: -108656. FPE: 3.09496e+28
AIC: 65.6022 Det(Omega_mle): 2.92932e+28
--------------------------------------------------------------------
Results for equation SET
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const 0.321214 0.214232 1.499 0.134
L1.SET -0.042167 0.022882 -1.843 0.065
L1.STI Index -0.029524 0.013575 -2.175 0.030
L1.Composite Index 0.013025 0.006471 2.013 0.044
L1.Shenzhen Component -0.004890 0.001363 -3.589 0.000
L1.Nikkei 225 -0.006980 0.001443 -4.838 0.000
L1.NYSE COMPOSITE (DJ) 0.030004 0.003696 8.117 0.000
L1.IBOVESPA 0.001310 0.000370 3.542 0.000
L1.S&P/CLX IPSA 0.015646 0.007859 1.991 0.047
L2.SET -0.039862 0.022797 -1.749 0.080
L2.STI Index -0.005468 0.013401 -0.408 0.683
L2.Composite Index 0.010791 0.006433 1.677 0.093
L2.Shenzhen Component 0.000186 0.001368 0.136 0.892
L2.Nikkei 225 -0.000588 0.001398 -0.421 0.674
L2.NYSE COMPOSITE (DJ) 0.015111 0.003957 3.819 0.000
L2.IBOVESPA 0.000049 0.000373 0.132 0.895
L2.S&P/CLX IPSA 0.021860 0.007810 2.799 0.005
=========================================================================================
Results for equation STI Index
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const -0.133620 0.394220 -0.339 0.735
L1.SET 0.021152 0.042107 0.502 0.615
L1.STI Index -0.101572 0.024979 -4.066 0.000
L1.Composite Index -0.007761 0.011908 -0.652 0.515
L1.Shenzhen Component -0.009963 0.002507 -3.974 0.000
L1.Nikkei 225 -0.006835 0.002655 -2.574 0.010
L1.NYSE COMPOSITE (DJ) 0.094091 0.006802 13.833 0.000
L1.IBOVESPA 0.002588 0.000681 3.803 0.000
L1.S&P/CLX IPSA 0.020213 0.014462 1.398 0.162
L2.SET 0.063763 0.041949 1.520 0.129
L2.STI Index -0.032032 0.024660 -1.299 0.194
L2.Composite Index 0.013961 0.011837 1.179 0.238
L2.Shenzhen Component -0.001238 0.002517 -0.492 0.623
L2.Nikkei 225 -0.002280 0.002572 -0.886 0.375
L2.NYSE COMPOSITE (DJ) 0.026122 0.007281 3.587 0.000
L2.IBOVESPA 0.000170 0.000686 0.248 0.804
L2.S&P/CLX IPSA 0.036798 0.014371 2.560 0.010
=========================================================================================
Results for equation Composite Index
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const 1.224000 0.772577 1.584 0.113
L1.SET 0.077585 0.082519 0.940 0.347
L1.STI Index -0.083495 0.048953 -1.706 0.088
L1.Composite Index 0.005048 0.023337 0.216 0.829
L1.Shenzhen Component -0.014694 0.004914 -2.990 0.003
L1.Nikkei 225 -0.025426 0.005203 -4.887 0.000
L1.NYSE COMPOSITE (DJ) 0.151848 0.013330 11.391 0.000
L1.IBOVESPA 0.003219 0.001334 2.414 0.016
L1.S&P/CLX IPSA 0.074761 0.028342 2.638 0.008
L2.SET 0.137545 0.082211 1.673 0.094
L2.STI Index 0.095567 0.048327 1.977 0.048
L2.Composite Index -0.022496 0.023198 -0.970 0.332
L2.Shenzhen Component -0.009325 0.004932 -1.891 0.059
L2.Nikkei 225 -0.005512 0.005040 -1.094 0.274
L2.NYSE COMPOSITE (DJ) 0.004878 0.014270 0.342 0.732
L2.IBOVESPA 0.000474 0.001344 0.353 0.724
L2.S&P/CLX IPSA -0.016672 0.028164 -0.592 0.554
=========================================================================================
Results for equation Shenzhen Component
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const -2.217163 3.300968 -0.672 0.502
L1.SET -0.246811 0.352578 -0.700 0.484
L1.STI Index -0.008235 0.209161 -0.039 0.969
L1.Composite Index -0.160104 0.099711 -1.606 0.108
L1.Shenzhen Component 0.007180 0.020994 0.342 0.732
L1.Nikkei 225 -0.002286 0.022230 -0.103 0.918
L1.NYSE COMPOSITE (DJ) 0.248233 0.056955 4.358 0.000
L1.IBOVESPA 0.006369 0.005698 1.118 0.264
L1.S&P/CLX IPSA 0.168118 0.121097 1.388 0.165
L2.SET 0.338037 0.351259 0.962 0.336
L2.STI Index -0.196512 0.206486 -0.952 0.341
L2.Composite Index 0.011139 0.099118 0.112 0.911
L2.Shenzhen Component -0.052734 0.021073 -2.502 0.012
L2.Nikkei 225 0.008270 0.021534 0.384 0.701
L2.NYSE COMPOSITE (DJ) 0.122160 0.060970 2.004 0.045
L2.IBOVESPA -0.007287 0.005741 -1.269 0.204
L2.S&P/CLX IPSA 0.129704 0.120338 1.078 0.281
=========================================================================================
Results for equation Nikkei 225
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const 2.228983 3.250524 0.686 0.493
L1.SET 0.405489 0.347190 1.168 0.243
L1.STI Index 0.255756 0.205965 1.242 0.214
L1.Composite Index -0.120054 0.098187 -1.223 0.221
L1.Shenzhen Component -0.030210 0.020673 -1.461 0.144
L1.Nikkei 225 -0.147346 0.021890 -6.731 0.000
L1.NYSE COMPOSITE (DJ) 1.013616 0.056085 18.073 0.000
L1.IBOVESPA -0.011445 0.005611 -2.040 0.041
L1.S&P/CLX IPSA -0.028053 0.119247 -0.235 0.814
L2.SET 0.420337 0.345891 1.215 0.224
L2.STI Index -0.062357 0.203331 -0.307 0.759
L2.Composite Index -0.000359 0.097604 -0.004 0.997
L2.Shenzhen Component -0.033048 0.020751 -1.593 0.111
L2.Nikkei 225 0.000280 0.021205 0.013 0.989
L2.NYSE COMPOSITE (DJ) 0.180409 0.060038 3.005 0.003
L2.IBOVESPA -0.006849 0.005653 -1.212 0.226
L2.S&P/CLX IPSA 0.107490 0.118499 0.907 0.364
=========================================================================================
Results for equation NYSE COMPOSITE (DJ)
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const 2.304950 1.553537 1.484 0.138
L1.SET -0.259275 0.165934 -1.563 0.118
L1.STI Index 0.040711 0.098438 0.414 0.679
L1.Composite Index 0.030575 0.046927 0.652 0.515
L1.Shenzhen Component -0.013126 0.009880 -1.329 0.184
L1.Nikkei 225 0.009372 0.010462 0.896 0.370
L1.NYSE COMPOSITE (DJ) -0.049226 0.026805 -1.836 0.066
L1.IBOVESPA 0.004541 0.002682 1.693 0.090
L1.S&P/CLX IPSA -0.063204 0.056992 -1.109 0.267
L2.SET 0.109147 0.165313 0.660 0.509
L2.STI Index -0.027171 0.097179 -0.280 0.780
L2.Composite Index -0.053514 0.046648 -1.147 0.251
L2.Shenzhen Component -0.007805 0.009917 -0.787 0.431
L2.Nikkei 225 -0.004063 0.010134 -0.401 0.688
L2.NYSE COMPOSITE (DJ) -0.005236 0.028694 -0.182 0.855
L2.IBOVESPA 0.001853 0.002702 0.686 0.493
L2.S&P/CLX IPSA 0.048817 0.056635 0.862 0.389
=========================================================================================
Results for equation IBOVESPA
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const 4.101881 14.878105 0.276 0.783
L1.SET -0.659355 1.589136 -0.415 0.678
L1.STI Index -0.226200 0.942731 -0.240 0.810
L1.Composite Index -0.043297 0.449416 -0.096 0.923
L1.Shenzhen Component -0.075121 0.094624 -0.794 0.427
L1.Nikkei 225 -0.083993 0.100194 -0.838 0.402
L1.NYSE COMPOSITE (DJ) 0.453117 0.256709 1.765 0.078
L1.IBOVESPA -0.043384 0.025684 -1.689 0.091
L1.S&P/CLX IPSA 0.150792 0.545809 0.276 0.782
L2.SET 0.811086 1.583193 0.512 0.608
L2.STI Index 0.909529 0.930674 0.977 0.328
L2.Composite Index -0.249620 0.446746 -0.559 0.576
L2.Shenzhen Component -0.051397 0.094979 -0.541 0.588
L2.Nikkei 225 0.012110 0.097057 0.125 0.901
L2.NYSE COMPOSITE (DJ) 0.207470 0.274804 0.755 0.450
L2.IBOVESPA 0.003458 0.025875 0.134 0.894
L2.S&P/CLX IPSA -0.187931 0.542385 -0.346 0.729
=========================================================================================
Results for equation S&P/CLX IPSA
=========================================================================================
coefficient std. error t-stat prob
-----------------------------------------------------------------------------------------
const 0.629942 0.656310 0.960 0.337
L1.SET -0.054951 0.070101 -0.784 0.433
L1.STI Index -0.121739 0.041586 -2.927 0.003
L1.Composite Index 0.064012 0.019825 3.229 0.001
L1.Shenzhen Component -0.011905 0.004174 -2.852 0.004
L1.Nikkei 225 -0.007580 0.004420 -1.715 0.086
L1.NYSE COMPOSITE (DJ) 0.038097 0.011324 3.364 0.001
L1.IBOVESPA 0.003716 0.001133 3.280 0.001
L1.S&P/CLX IPSA 0.077499 0.024077 3.219 0.001
L2.SET 0.026445 0.069839 0.379 0.705
L2.STI Index -0.016161 0.041054 -0.394 0.694
L2.Composite Index 0.005918 0.019707 0.300 0.764
L2.Shenzhen Component 0.001551 0.004190 0.370 0.711
L2.Nikkei 225 -0.003059 0.004281 -0.715 0.475
L2.NYSE COMPOSITE (DJ) 0.024106 0.012122 1.989 0.047
L2.IBOVESPA 0.000902 0.001141 0.791 0.429
L2.S&P/CLX IPSA -0.039068 0.023926 -1.633 0.102
=========================================================================================
Correlation matrix of residuals
SET STI Index Composite Index Shenzhen Component Nikkei 225 NYSE COMPOSITE (DJ) IBOVESPA S&P/CLX IPSA
SET 1.000000 0.390513 0.395012 0.159000 0.200853 0.243404 0.168544 0.223186
STI Index 0.390513 1.000000 0.422152 0.245147 0.356406 0.348887 0.250367 0.283163
Composite Index 0.395012 0.422152 1.000000 0.163295 0.191981 0.195581 0.175833 0.263334
Shenzhen Component 0.159000 0.245147 0.163295 1.000000 0.165296 0.142169 0.117262 0.116662
Nikkei 225 0.200853 0.356406 0.191981 0.165296 1.000000 0.218226 0.098886 0.119350
NYSE COMPOSITE (DJ) 0.243404 0.348887 0.195581 0.142169 0.218226 1.000000 0.582842 0.470261
IBOVESPA 0.168544 0.250367 0.175833 0.117262 0.098886 0.582842 1.000000 0.446622
S&P/CLX IPSA 0.223186 0.283163 0.263334 0.116662 0.119350 0.470261 0.446622 1.000000
y_fitted = res_select.fittedvalues
plt.figure(figsize = (15,5))
plt.plot(res_select.resid, label='resid')
plt.plot(y_fitted, label='VAR prediction')
plt.xlabel('Date')
plt.xticks(rotation=45)
plt.ylabel('Residuals')
plt.grid(True)
#Commodity
df_commodity = df.loc[:,['SET','Gold Jun 21','Crude Oil May 21','Bitcoin USD']]
#Split Training Data(70%)/Validation Data(30%)
n_obs = 2467 #For traning data
X_train_com = df_commodity[0:n_obs]
X_validation_com = df_commodity[n_obs:]
print(X_train_com.shape,X_validation_com.shape)
#Transformation
X_transform_com_data = X_train_com.diff().dropna()
X_transform_com_data.head()
X_transform_com_data.describe()
X_transform_com_data.plot()
print(grangers_causality_matrix(X_transform_com_data, variables = X_transform_com_data.columns))
#Lag Order Selection
model_com = VAR(endog = X_transform_com_data)
res_com = model_com.select_order(30)
print(res_com.summary())
mod_com = VAR(X_transform_com_data)
res_com = mod_com.fit(maxlags=30, ic='aic')
print(res_com.summary())
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-42-117eb9302071> in <module> 1 #Commodity ----> 2 df_commodity = df.loc[:,['SET','Gold Jun 21','Crude Oil May 21','Bitcoin USD']] 3 #Split Training Data(70%)/Validation Data(30%) 4 n_obs = 2467 #For traning data 5 X_train_com = df_commodity[0:n_obs] ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in __getitem__(self, key) 887 # AttributeError for IntervalTree get_value 888 return self.obj._get_value(*key, takeable=self._takeable) --> 889 return self._getitem_tuple(key) 890 else: 891 # we by definition only have the 0th axis ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_tuple(self, tup) 1067 return self._multi_take(tup) 1068 -> 1069 return self._getitem_tuple_same_dim(tup) 1070 1071 def _get_label(self, label, axis: int): ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_tuple_same_dim(self, tup) 773 continue 774 --> 775 retval = getattr(retval, self.name)._getitem_axis(key, axis=i) 776 # We should never have retval.ndim < self.ndim, as that should 777 # be handled by the _getitem_lowerdim call above. ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_axis(self, key, axis) 1111 raise ValueError("Cannot index with multidimensional key") 1112 -> 1113 return self._getitem_iterable(key, axis=axis) 1114 1115 # nested tuple slicing ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _getitem_iterable(self, key, axis) 1051 1052 # A collection of keys -> 1053 keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False) 1054 return self.obj._reindex_with_indexers( 1055 {axis: [keyarr, indexer]}, copy=True, allow_dups=True ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _get_listlike_indexer(self, key, axis, raise_missing) 1264 keyarr, indexer, new_indexer = ax._reindex_non_unique(keyarr) 1265 -> 1266 self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing) 1267 return keyarr, indexer 1268 ~\Anaconda3\envs\P and R\lib\site-packages\pandas\core\indexing.py in _validate_read_indexer(self, key, indexer, axis, raise_missing) 1319 1320 with option_context("display.max_seq_items", 10, "display.width", 80): -> 1321 raise KeyError( 1322 "Passing list-likes to .loc or [] with any missing labels " 1323 "is no longer supported. " KeyError: "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Index(['Crude Oil May 21'], dtype='object'). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"
#Prediction
# Get the lag order
lag_order = res_world.k_ar
print(lag_order)
# Input data for forecasting
input_data = X_transform_data.values[-lag_order:]
print(input_data)
# Split Training Data(70%)/Validation Data(30%)
# n_obs = 2467 #For traning data
# X_train = df_stock[0:n_obs]
# X_validation = df_stock[n_obs:]
# print(X_train.shape,X_validation.shape)
# forecasting
pred = res_world.forecast(y=input_data, steps=1058)
pred = (pd.DataFrame(pred ,index = X_validation.index,columns=X_validation.columns + '_pred'))
pred
1 [[-2.99000000e+00 2.89500000e+01 -2.26098633e+01 2.42301025e+01 5.63261719e+01 1.17109375e+02 -2.72220703e+02 -1.30639648e+02 -5.67500000e+01 3.51289062e+01 5.12998047e+01 -4.70996094e+01 1.47540039e+02 -2.15498047e+01 -1.94199219e+01 -5.82705078e+01 7.99926758e-01 -3.33007812e+01 -6.38999023e+01 1.38000000e+02 1.97769531e+02 9.40898438e+01 5.96000977e+01 9.53098145e+01 -1.12700000e+03 -3.28492188e+02 5.33300781e+01 2.55078125e+00]]
| SET_pred | VNI_pred | STI Index_pred | FTSE Bursa Malaysia KLCI_pred | Composite Index_pred | PSEi INDEX_pred | HANG SENG INDEX_pred | Shenzhen Component_pred | KOSPI Composite Index_pred | Nikkei 225_pred | ALL ORDINARIES_pred | S&P/NZX 50 INDEX GROSS ( GROSS _pred | TSEC weighted index_pred | NIFTY 50_pred | Dow Jones Industrial Average_pred | NYSE COMPOSITE (DJ)_pred | Russell 2000_pred | S&P/TSX Composite index_pred | NASDAQ Composite_pred | FTSE 100_pred | DAX PERFORMANCE-INDEX_pred | CAC 40_pred | ESTX 50 PR.EUR_pred | BEL 20_pred | IBOVESPA_pred | IPC MEXICO_pred | S&P/CLX IPSA_pred | MERVAL_pred | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Date | ||||||||||||||||||||||||||||
| 2018-02-08 | -4.002932 | 0.201392 | -13.810540 | -3.174284 | -37.071157 | -26.991800 | -41.481112 | 24.729155 | 6.746785 | 60.097357 | 2.558358 | -3.468390 | -51.790193 | -50.368494 | 35.208103 | 24.796325 | 3.354092 | 32.775033 | 6.082373 | -58.648645 | -56.018354 | -35.221950 | -24.354424 | -18.797839 | -122.939468 | -79.805195 | -1.349900 | -40.438537 |
| 2018-02-09 | 1.063423 | 0.293161 | 1.174065 | 0.110811 | 4.846914 | -4.198004 | 11.989706 | 14.544453 | -1.859715 | -8.919021 | -2.373201 | 0.918657 | -1.712454 | 5.347156 | -3.328601 | -6.468447 | -0.552250 | -3.860766 | -1.562024 | 13.679333 | 22.008342 | 10.309818 | 7.820713 | 5.572573 | 14.751276 | 14.954954 | 0.568118 | 14.759758 |
| 2018-02-10 | -0.023452 | 0.050498 | -0.527193 | 0.077956 | -0.186441 | 1.840235 | -3.479503 | -3.587955 | 0.476187 | 5.893382 | 0.960279 | 1.651051 | 0.344577 | -0.872074 | 8.347404 | 3.987609 | 0.534742 | 1.644255 | 2.401148 | -4.303774 | -4.050055 | -2.831836 | -2.486800 | -1.385868 | 1.899932 | -0.800021 | 0.258119 | 9.817278 |
| 2018-02-11 | 0.503792 | 0.227911 | 0.260078 | 0.216818 | 1.951638 | 1.956095 | 3.650934 | -1.048015 | 0.130143 | 3.372113 | 0.030176 | 1.942000 | 0.673824 | 2.646000 | 5.096284 | 1.595619 | 0.313139 | 1.213766 | 1.750150 | 2.034140 | 4.624246 | 1.479244 | 0.992863 | 1.145197 | 3.929970 | 8.126266 | 0.911673 | 12.155264 |
| 2018-02-12 | 0.394893 | 0.195984 | 0.147990 | 0.217498 | 1.461201 | 2.326365 | 3.008578 | -1.421387 | 0.327153 | 4.843538 | 0.559791 | 1.988362 | 0.928553 | 1.890735 | 6.000640 | 2.326342 | 0.363745 | 1.459947 | 1.963984 | 0.267037 | 2.080558 | 0.206466 | -0.076147 | 0.396822 | 5.108983 | 5.922510 | 0.829665 | 11.663110 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 2020-12-27 | 0.424630 | 0.205660 | 0.181597 | 0.221005 | 1.580764 | 2.269722 | 3.229183 | -1.323809 | 0.286318 | 4.456116 | 0.422972 | 1.993419 | 0.920738 | 2.089135 | 5.813261 | 2.166175 | 0.353337 | 1.403250 | 1.923476 | 0.689529 | 2.644728 | 0.491901 | 0.170526 | 0.563130 | 5.002897 | 6.530742 | 0.858875 | 11.833621 |
| 2020-12-28 | 0.424630 | 0.205660 | 0.181597 | 0.221005 | 1.580764 | 2.269722 | 3.229183 | -1.323809 | 0.286318 | 4.456116 | 0.422972 | 1.993419 | 0.920738 | 2.089135 | 5.813261 | 2.166175 | 0.353337 | 1.403250 | 1.923476 | 0.689529 | 2.644728 | 0.491901 | 0.170526 | 0.563130 | 5.002897 | 6.530742 | 0.858875 | 11.833621 |
| 2020-12-29 | 0.424630 | 0.205660 | 0.181597 | 0.221005 | 1.580764 | 2.269722 | 3.229183 | -1.323809 | 0.286318 | 4.456116 | 0.422972 | 1.993419 | 0.920738 | 2.089135 | 5.813261 | 2.166175 | 0.353337 | 1.403250 | 1.923476 | 0.689529 | 2.644728 | 0.491901 | 0.170526 | 0.563130 | 5.002897 | 6.530742 | 0.858875 | 11.833621 |
| 2020-12-30 | 0.424630 | 0.205660 | 0.181597 | 0.221005 | 1.580764 | 2.269722 | 3.229183 | -1.323809 | 0.286318 | 4.456116 | 0.422972 | 1.993419 | 0.920738 | 2.089135 | 5.813261 | 2.166175 | 0.353337 | 1.403250 | 1.923476 | 0.689529 | 2.644728 | 0.491901 | 0.170526 | 0.563130 | 5.002897 | 6.530742 | 0.858875 | 11.833621 |
| 2020-12-31 | 0.424630 | 0.205660 | 0.181597 | 0.221005 | 1.580764 | 2.269722 | 3.229183 | -1.323809 | 0.286318 | 4.456116 | 0.422972 | 1.993419 | 0.920738 | 2.089135 | 5.813261 | 2.166175 | 0.353337 | 1.403250 | 1.923476 | 0.689529 | 2.644728 | 0.491901 | 0.170526 | 0.563130 | 5.002897 | 6.530742 | 0.858875 | 11.833621 |
1058 rows × 28 columns
# inverting transformation
def invert_transformation(X_train, pred):
forecast = pred.copy()
columns = X_train.columns
for col in columns:
forecast[str(col)+'_pred'] = X_train[col].iloc[-1] + forecast[str(col)+'_pred'].cumsum()
return forecast
output = invert_transformation(X_validation, pred)
# combining predicted and real data set
combine = pd.concat([output['SET_pred'], X_validation['SET']], axis=1)
combine['accuracy'] = round(combine.apply(lambda row: row.SET_pred /row.SET *100, axis = 1),2)
combine['accuracy'] = pd.Series(["{0:.2f}%".format(val) for val in combine['accuracy']],index = combine.index)
combine = combine.round(decimals=2)
combine = combine.reset_index()
combine = combine.sort_values(by='Date', ascending=True)
combine
| Date | SET_pred | SET | accuracy | |
|---|---|---|---|---|
| 0 | 2018-02-08 | 1445.35 | 1786.66 | 80.90% |
| 1 | 2018-02-09 | 1446.41 | 1786.45 | 80.97% |
| 2 | 2018-02-10 | 1446.39 | 1786.45 | 80.96% |
| 3 | 2018-02-11 | 1446.89 | 1786.45 | 80.99% |
| 4 | 2018-02-12 | 1447.29 | 1799.45 | 80.43% |
| ... | ... | ... | ... | ... |
| 1053 | 2020-12-27 | 1892.73 | 1486.31 | 127.34% |
| 1054 | 2020-12-28 | 1893.15 | 1452.67 | 130.32% |
| 1055 | 2020-12-29 | 1893.58 | 1461.95 | 129.52% |
| 1056 | 2020-12-30 | 1894.00 | 1449.35 | 130.68% |
| 1057 | 2020-12-31 | 1894.43 | 1449.35 | 130.71% |
1058 rows × 4 columns
df = combine[['SET_pred','SET']]
df.index = combine['Date']
df.plot()
<AxesSubplot:xlabel='Date'>
from sklearn.metrics import mean_absolute_error
from sklearn.metrics import mean_squared_error
import math
#Forecast bias
forecast_errors = [combine['SET'][i]- combine['SET_pred'][i] for i in range(len(combine['SET']))]
bias = sum(forecast_errors) * 1.0/len(combine['SET'])
print('Bias: %f' % bias)
print('Mean absolute error:', mean_absolute_error(combine['SET'].values, combine['SET_pred'].values))
print('Mean squared error:', mean_squared_error(combine['SET'].values, combine['SET_pred'].values))
print('Root mean squared error:', math.sqrt(mean_squared_error(combine['SET'].values, combine['SET_pred'].values)))
Bias: -110.831985 Mean absolute error: 243.58474480151227 Mean squared error: 100603.20918374292 Root mean squared error: 317.18008951342284
lag_order = res_ASEAN.k_ar
# forecast 8 periods foreward
res_ASEAN.forecast(X_transform_ASEAN.values[-lag_order:],8)
array([[-8.25905450e-01, -2.22381381e+00, -8.67043845e+00,
-7.80983773e-01, -2.63648185e+00, -1.51251957e+01],
[ 6.32287515e-01, -2.20746348e+00, 7.53731200e+00,
-3.74517320e-02, 1.23516946e+01, -1.56731678e+01],
[ 8.07328225e-01, 4.54349579e-01, -2.48001323e+00,
-8.34641775e-01, -1.73694327e+01, -1.54826534e+00],
[ 2.67776060e-01, 2.29891374e-01, -4.93729773e-02,
3.63431765e-01, 2.32213117e+00, 3.45749144e+00],
[-1.02050410e-02, 4.20359568e-02, -1.34817207e-01,
2.38813580e-01, 2.28762972e+00, 3.71315077e+00],
[ 4.55073159e-01, 1.64292281e-01, 5.01400834e-01,
1.40059400e-01, 3.22057830e+00, 1.26422669e-01],
[ 5.03182412e-01, 1.89013940e-01, 2.00070893e-01,
2.50853218e-01, 1.51259369e+00, 2.57835441e+00],
[ 4.54596947e-01, 2.14965944e-01, 1.68132680e-01,
2.47850511e-01, 1.46003694e+00, 2.49968990e+00]])
res_ASEAN.plot_forecast(5)
#Impulse Response Function
irf = res_ASEAN.irf(10)
irf.plot(orth=False,figsize = (20,10))
irf = res_NA.irf(10)
irf.plot(orth=False,figsize = (30,20))